Discussion Locked

Dsn-less connection with ADO

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi.
I have problem to connect Sql server with ADO with out any DSN.
I connect with DSN, but I want to coonect it with out DSN.
Is there any solution about this???
Hemant.

2 replies

by rmcduffie

Use these in your connect string:
"Driver=SQL Server;"
"SERVER=" + strServer + ";"
"UID=" + strLoginID + ";"
"PWD=" + strPwd + ";"
"DATABASE=" + strDBS + ";"

If you don't have a database name you might want to use the ODBC API instead.

Rob McDuffie

This discussion is closed to new replies.