小弟现在做一个
系统要求多用户同时操作不知道该如何做
以前都是写的单人使用的系统
我现在是想在系统中加个
数据库设置的可以让客户连接到
服务器上的
数据库
但是老是连不上去
不知道这样做可不可以
我用的是Sql Server2000的而且还是个人版的
具体打什么补丁啊还有防火墙什么的怎么解决
我直接在登录界面的登录按钮判断连接是否成功如果不成功则弹出数据库连接的窗体
但是这个窗体老是连不上去,下面是连接按钮的代码
var
connectstring:String;
begin
if frm_data.conn.Connected then
begin
Application.MessageBox('数据库已经连接','提示',mb_ok or mb_IconInformation);
exit;
end;
if self.RadioGroup1.ItemIndex=-1 then
begin
Application.MessageBox('请选择验证方式','提示',mb_ok or mb_IconInformation);
exit;
end;
case self.RadioGroup1.ItemIndex of
0: connectstring:='Provider=SQLOLEDB.1

assword='+Trim(Edit3.Text)+'

ersist Security Info=False;User ID='+Trim(Edit2.Text)+';Initial Catalog=work;Data Source='+Trim(Edit1.Text);
1: connectstring:='Provider=SQLOLEDB.1;Integrated Security=SSPI

ersist Security Info=False;Initial Catalog=work;Data Source='+Trim(Edit1.Text);
end;
frm_data.conn.ConnectionString:=connectstring;
try
frm_data.conn.Open;
Application.MessageBox('数据库配置成功','提示',mb_ok or mb_IconInformation);
except
Application.MessageBox('数据库配置失败','提示',mb_ok or mb_IconInformation);
end;
end;
本人使用的开发
工具是Delphi7.0