SQL Native Client ODBCPrompt for username and password

This one is a bit tricky. First you need to set the connection object's Prompt property to adPromptAlways. Then use the connection string to connect to the database.

oConn.Properties("Prompt") = adPromptAlways

oConn.Open "Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;"

Connecting

This connection string (Prompt for username and password using SQL Native Client ODBC) can be used for connections to SQL Server 2000, SQL Server 2005 and SQL Server 7.0.

Articlesread all »

Not the right connection string for you?

Start over in the connection string reference index.

You can also get help in the Q&A forums where you can ask your own question.

The kb articles contains how-tos and instructions and you can search for anything if you're not sure were to look.