T
totoking
Unregistered / Unconfirmed
GUEST, unregistred user!
conn:=TADOConnection.Create(self);
conn.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ylqx;Data Source='+edit1.Text;
conn.LoginPrompt:=false;
try
conn.Connected:=true;
except
application.MessageBox('连接数据库错误,请检查服务器名称或IP是否输入正确!','警告',64+0);
application.Terminate ;
conn.ConnectionString:='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ylqx;Data Source='+edit1.Text;
conn.LoginPrompt:=false;
try
conn.Connected:=true;
except
application.MessageBox('连接数据库错误,请检查服务器名称或IP是否输入正确!','警告',64+0);
application.Terminate ;