Connect to SQL 2000

G

Guest

I am trying to connect to a sql server 2000 database from Access 2003 using
the opendatabase method and an odbc dsn without any success.
sql server name is montagnosdv1
sql database name is cmbs
security is trusted connection
dsn name is cmbs_development

I tried several combinations for the dbname property including:
using set db = ws.opendatabase("odbc;dsn=cmbs_development,false,false)

can someone please give me the correct connection string.
Thanks
 
D

dbahooker

hey james you don't need a connection string

u just need to use Access Data Projectas

FILE, NEW, PROJECT EXISTING DATA
 
S

Sylvain Lafontaine

When using a connection string, the connection string must be the fourth
parameter:

set db = ws.opendatabase ("", false, false, "odbc;dsn=cmbs_development")

The database should be stored in the DSN as the default database to connect
to (this is in the third dialog window when creating the DSN) or you could
also use the first parameter:

set db = ws.opendatabase ("cmbs", false, false,
"odbc;dsn=cmbs_development")

Finally, this must be a System DSN, not an User DSN.
 

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