nadim96
3 years agoNew Member
ADO connection to delete record
hello
I have MS SQL Server and using python for TC scripting.
my query to select and retreve data from the DB works fine. the problem is with the below script for deleting a record.
I have the required DB permissions and the query works fine from MS SQL. the DB connection work fine as well.
def TestSQL_ADO():
Qry = ADO.CreateADOQuery();
Qry.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=ConnectDB; Server = 9.9.9.9; Database=myDB;user id =nadim;password=****"
Qry.SQL = "Delete From Login.User Where User_Login_Name = 'NADIM1'"
Qry.ExecSQL()
Qry.Close()