Re: ADOX/ADO quirk when creating a primary key

From: Rob Nicholson (informed_at_community.nospam)
Date: 11/27/04


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.



Relevant Pages

  • Re: truncating text fields
    ... Because of customer requirements, I'm constrained to version 7, which doesn't seem to support direct import/export between FM and Excel. ... I found that Windows FM had many UI anomalies and non-standard interfaces that don't exist in other Windows programs. ... I spent the same amount of time unsuccessfully trying to generate properly formatted labels in FM as I did coming up with a successful solution through the export method, although for a more experienced developer, the converse would probably be true. ... It will even do some basic formatting so that the Excel cells resemble the data in FileMaker. ...
    (comp.databases.filemaker)
  • My apologies, I did not mean that to you,at all.
    ... I have word and excel in multiple separate windows which allow me to resize ... Why we would need Powerpoint in separate instances are for the same reason. ...
    (microsoft.public.excel.setup)
  • RE: Excel 2003: Not enough system resources to display completely
    ... I'm not sure if the message occurs when starting Excel with /s switch. ... Click the Services tab, click to check the "Hide All Microsoft Services" ... 281770 How to perform clean-boot troubleshooting for Windows 2000 ... we need to start Windows under safe mode to test. ...
    (microsoft.public.excel.setup)
  • Re: X Box 360? errrrrr no thanks
    ... Windows is quite simply the best tool for the job. ... What does Excel have to do with Windows? ... Is it shoddy simply because it doesn`t meet the needs ... doesn`t meet my neighbours need to transport his large family round in ...
    (uk.games.video.playstation)
  • Re: Problem with Follow Hyperlink
    ... When you double-click on an XLS file in Windows Explorer, ... Type the location of an Excel file (e.g. ... UntilTime = DateAdd("s", SecondsToWait, Now()) ... John Nurick [Microsoft Access MVP] ...
    (microsoft.public.access.externaldata)

Quantcast