Forum Discussion

newtotc's avatar
newtotc
Occasional Contributor
13 years ago

establish ADODriver Connection string in vb

I am trying to establish a sql 2008 db connection string in vb script in test complete

here are the details




Driver =DDT.ADODriver("Provider=SQLOLEDB.1;Server=133.12.2.166;Database= testdb;Uid=uname;Pwd=pwd;", "dbo.table")



note: above values of parameters have been changed.

When i execute - this is the error message i am getting



Provider cannot be found. It may not be properly installed




  • newtotc's avatar
    newtotc
    Occasional Contributor
    i did resolve the above syntax but now I am getting new error



    Cannot open database " testDBase" requested by the login. The login failed



    even though I can connect witht he same login and password through SQL studio

    please help



    thanks



  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi,



    Please double-check your connection string syntax at:

    http://www.connectionstrings.com/sql-server-2008



    Also, please try the following:

    * Create an empty .udl file on the desktop.

    * Double-click the file.

    * Use the Data Link Properties wizard to specify the connection parameters, test the connection, and then click OK.

    * Open the .udl file in any text editor (e.g. Notepad) and copy the connection string from this file.