I'm executing sql scripts while using ADO and MSSQL server . Under Here you will find an first example of a multi lines sql statement like :
use master;
go;
EXEC sp_detach_db
@dbname=N'DATABASENAME';
go;
I copy these lines from a Tmemo to my TADOQuery.sql.text but fail as already the go statement is not recognized and I get a keyword error by the mssql server. Can I run the whole sript as one TQquery or do I have th split my query into several pieces, separated by the semicolon and iterate through the whole text ?