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

Fred Hooper fahooper at trapo.com
Fri Oct 15 13:38:18 CDT 2004


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
|




More information about the AccessD mailing list