Question of 7/3/03

  • hi folks! don't get me wrong, but i wouldn't choose any possibiliy for the connection string (regardless if wrong or right)!

    looking at the documentation of MDAC you'll find that you should use the following syntax for the connection string:

    Provider=SQLOLEDB.1;Data Source=SalesTracking;Initial Catalog=Sales;

    furthermore you should supply username and password in the ADODB.Connection.Open method (2nd and 3rd parameter).

    best regards,

    chris.

  • You're right.

    I picked up the correct answer by choosing the one with less errors 😉

    Anyway, the only error I found in the 'correct' answer was the use of 'Driver=SQL Server' instead of 'Provider=SQLOLEDB', so I don't understand you're objection about username and password. Or was it just a suggestion or 'best practice'?

    Regards

    Salvor

    Salvor


    Salvor

  • The one about usr and pwd was just "best practice" advice -> code clarity and readability.

    regards,

    chris.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply