Z
zyycc
Unregistered / Unconfirmed
GUEST, unregistred user!
近来用SQLDMO编程,想用ExecuteWithResultsAndMessages来得到结果及返回的信息
var Str:WideString;SQLServer,CurDB:variant
SQLServer := CreateOleObject('SQLDMO.SQLServer');
SQLServer.LoginSecure := True;
SQLServer.Connect;
CurDB:=SQLServer.Databases.Item('pub');
CurDB.ExecuteWithResultsAndMessages(Memo1.Lines.Text,
Length(Memo1.Lines.Text)+20,Str);
可是,不论Str为什么类型,Str的值始终为空,郁闷!
var Str:WideString;SQLServer,CurDB:variant
SQLServer := CreateOleObject('SQLDMO.SQLServer');
SQLServer.LoginSecure := True;
SQLServer.Connect;
CurDB:=SQLServer.Databases.Item('pub');
CurDB.ExecuteWithResultsAndMessages(Memo1.Lines.Text,
Length(Memo1.Lines.Text)+20,Str);
可是,不论Str为什么类型,Str的值始终为空,郁闷!