DKumar04
6 years agoContributor
Unable to connect to my local db
Error thrown when I am trying to restore my local DB using ADO object available in Testcomplete
Here is my full script
(Written in Jscript)
var con,query,result; con=ADO.CreateADOConnection(); con.ConnectionString = "Provider=SQLNCLI11;Server=mylocalserver;Database=MyLocalDB;Integrated Security=True;DataTypeCompatibility=80;Uid=sa;Pwd=123123;"; con.Open(); query=ADO.CreateADOQuery(); query.SQL="RESTORE DATABASE MyLocalDB FROM DISK = 'C:\\Test\\TestsBackup\\Data\\DB\\MyLocalDB.bak' WITH REPLACE"; query.Active=con; result=query.ExecSQL(); con.Close();
When executing throws an below error,