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

Tom Bolton tom.bolton at donnslaw.co.uk
Mon Oct 18 07:26:31 CDT 2004


Fred 

I think you may be on to something with the permissions, I'll look into it.

Many thanks!
Tom


-----Original Message-----
From: Fred Hooper [mailto:fahooper at trapo.com] 
Sent: 15 October 2004 19:38
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] RE: A2k2 doCmd.RunSQL won't run my SQL...

Hi Tom,

Two thoughts:
(1) Your permissions may be different in your two methods of executing the
SQL depending on how SQL Server is set up.
(2) I haven't tried to use DoCmd.RunSQL for indexing SQL Server. However,
I've successfully used an ADO cmd for indexing. Unfortunately, I no longer
have the code for an example.

Hope this helps,
Fred Hooper

|-----Original Message-----
|From: accessd-bounces at databaseadvisors.com 
|[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tom Bolton
|Sent: Friday, October 15, 2004 11:36 AM
|To: 'accessd at databaseadvisors.com'
|Subject: [AccessD] RE: A2k2 doCmd.RunSQL won't run my SQL...
|
|
|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
|

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-------------- 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