SQL Server connection

J

J

I wish to connect to a database to do an SQL delete
command.
Works ok in straight access.
The table was migrated to sql server and I wish to do the
same operation.

Connection comes up with a 3146 ODBC call failed error
when I try to connect automatically.
Connection works fine when I connect manually using the
dbDriverprompt parameter.

I have cut and pasted the parameters from the manual
connection in to the auto connection but still get the
same error. anyone any ideas?

Set wrkODBC = CreateWorkspace("EFACS", "sa", "exelexel",
dbUseODBC) ' no errors given

Params = "ODBC;DRIVER=SQL
Server;SERVER=EFACSSERVER;UID=sa;PWD=exelexel;APP=Microsoft
Open Database Connectivity;WSID=IT-2;DATABASE=whatifdb"

Set conefacs = wrkODBC.OpenConnection("CON_1",
dbDriverComplete, False, Params)
' gives 3146 run time error
 
V

Vadim Rapp

Hello J:
You wrote on Thu, 15 Jul 2004 03:34:22 -0700:

J> Set conefacs = wrkODBC.OpenConnection("CON_1",
J> dbDriverComplete, False, Params)
J> ' gives 3146 run time error

change "CON_1" to empty string:

wrkODBC.OpenConnection("",dbDriverComplete, False, Params)


Vadim
 
G

Guest

-----Original Message-----
Hello J:
You wrote on Thu, 15 Jul 2004 03:34:22 -0700:

J> Set conefacs = wrkODBC.OpenConnection("CON_1",
J> dbDriverComplete, False, Params)
J> ' gives 3146 run time error

change "CON_1" to empty string:

wrkODBC.OpenConnection("",dbDriverComplete, False, Params)


Vadim
----------------------------------------
Vadim Rapp Consulting
SQL, Access, VB Solutions
847-685-9073
www.vadimrapp.com
.
Thanks Vadim
Now, when I run manually everything completely pre-filled
in correctly apart from DSN; where it needs some hand
steering. Will work on that last barrier.

Thanks again
 
G

Guest

Now, when I run manually everything completely pre-filled
in correctly apart from DSN; where it needs some hand
steering. Will work on that last barrier.

Thanks again
.
Microsoft Knowledgebase - 327268 talks about setting up
the DSN as a Machine not File DSN. I have done that and it
works automatically now. Probably was looking in the
machine folder for the dsn by default - couldn't find it
and stopped whilst awaiting user input.

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top