Re: ADOX/ADO quirk when creating a primary key
From: Rob Nicholson (informed_at_community.nospam)
Date: 11/27/04
- Next message: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Previous message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- In reply to: Kevin Yu [MSFT]: "Re: ADOX/ADO quirk when creating a primary key"
- Next in thread: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Reply: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 27 Nov 2004 15:00:50 -0000
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that your SELECT COUNT(*) code doesn't work
> properly in your VBA project. If there is any misunderstanding, please
feel
> free to let me know.
Yes, that's the basic symptom - SELECT COUNT(*) returns zero, not 10.
> Thanks for the code you have provided. However, with these code I cannot
> reproduce this problem. On my machine, it works as expected with the
> primary key set. The following is the output.
>
> Fred 01
> Fred 02
> Fred 03
> Fred 04
> Fred 05
> Fred 06
> Fred 07
> Fred 08
> Fred 09
> Fred 10
> 10 records
Hmm, intruiging. Here's the output I get:
Fred 01
Fred 02
Fred 03
Fred 04
Fred 05
Fred 06
Fred 07
Fred 08
Fred 09
Fred 10
0 records
But if I comment out the line to add the primary key, it reports 10 records
correctly.
The original problem was encountered on a Windows 2000 PC running Office
2000. The VBA code is actually been run in Excel, I just so happen to be
using a Jet (Access) database.
However, I've just repeated exactly the same result on my home PC runing
Windows XP and Excel 2003.
This is using ADO 2.7 and ADOX 2.7 in both cases. Bizarre isn't it.
I'll try the same code in Access 2003.
Cheers, Rob.
- Next message: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Previous message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- In reply to: Kevin Yu [MSFT]: "Re: ADOX/ADO quirk when creating a primary key"
- Next in thread: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Reply: Rob Nicholson: "Re: ADOX/ADO quirk when creating a primary key"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|