[AccessD] RE: A2k2 doCmd.RunSQL won't run my SQL...

Tom Bolton tom.bolton at donnslaw.co.uk
Fri Oct 15 10:36:10 CDT 2004


Hi guys

First post from a VB / ASP developer who's been left in charge of an Access
mod...  sorry to kick off by begging for help ;-)

I am trying to programatically link to an SQL v7 table from my Access DB,
the source table sits on a networked SQL Server box.  I'm using ADOX etc. to
bring the table in.  Everything goes fine until I try and index the table
with an SQL CREATE INDEX statement, executed using the DoCmd.RunSQL method.
It just doesn't work - it fails silently.

If I take the contents of the string variable from the immediate window and
paste it into a query, it runs fine and indexes my table.

It's driving me to distraction...  any help would be greatly appreciated,
many thanks in advance.

Tom Bolton
-------------- next part --------------

The contents of this message and any attachments are the property of Donns Solicitors 
and are intended for the confidential use of the named recipient only.  They may be legally
 privileged and should not be communicated to, or relied upon, by any other party without 
our written consent.  If you are not the addressee, please notify us immediately so that we 
can make arrangements for its return.  You should not show this e-mail to any person or
 take copies as you may be committing a criminal or civil offence for which you may be
 liable.  The statement and opinions expressed in this e-mail message are those of the 
writer, and do not necessarily represent that of Donns Solicitors.  Although any files attached
 to this e-mail will have been checked with virus protection software prior to transmission, 
you should carry out your own virus check before opening any attachment.  
Donns Solicitors does not accept any liability for any damage or loss which may be caused 
by software viruses...


More information about the AccessD mailing list