Forum Discussion
2 Replies
- ddangSmartBear Alumni (Retired)
Could you provide the script that you're trying to run? Also, I'm not really sure exactly what the issue is. What do you mean by, "the database is not allowing me to change its name or delete"?
By "database file" I assume you mean a Table Stores object? Do you mean you're unable to delete or modify this object?
- jdwatherContributor
run a select in the database to fetch some information, then I close the connection, then I need to delete this database and copy a new database, but even I closing the connection to the database, I can not delete. I can only delete after stopping running the TestComplete. Sorry for English, it's not my language.
Below the connection script and the script that deletes the database:function SelectBD(comandoString : string) : OleVariant;
var Aconexao, RecSet, Cmd, Prm : OleVariant;
begin
Log.LockEvents();
try
AConexao := ADO.CreateConnection;
AConexao.ConnectionString := 'Provider=MSDASQL.1;Persist Security Info=False; Data Source='+retornaStringBase;
Aconexao.Open;
Cmd := ADO.CreateCommand;
Cmd.ActiveConnection := Aconexao;
Cmd.CommandType := adCmdText;
Cmd.CommandText := comandoString;
RecSet := Cmd.Execute;
result := RecSet;
Aconexao.Close;
except
Log.Error('Exception', exceptionmessage);
end;
Log.LockEvents();
end;
procedurete deleteDataBase;
begin
aqFile.Delete(D:\Base_Eco\eco.eco');
end;
Related Content
Recent Discussions
- 2 hours agojstaehlin
- 20 hours agoAivanitskiy
- 23 hours agonastester