XP系统下,VB.NET程序运行时,报错 sql server 不存在或访问被拒绝????急!!!!
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参阅此消息的结尾。
************** 异常文本 **************
System.Data.SqlClient.SqlException: SQL Server 不存在或访问被拒绝。
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at caizhi.Form9.Form9_Load(Object sender, EventArgs e) in E:\caizhi\Form9.vb:line 323
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
以上是详细的提示!
一样的程序,一样的数据库,我在2000的系统中能用,一切正常,但在XP系统中,把程序拿过来,把数据库也一样的安装好,把2000下的数据库备份,恢复到XP系统下的SQLserver数据库中,程序就不能用了,是不是XP与2000在用户权限方面有不同之处,导致程序无法访问到SQL SERVER???
请高手指教!!!
问题点数:0、回复次数:6Top
1 楼JonasFeng(狂学.NET)回复于 2005-04-04 16:07:54 得分 0
XP与2000在用户权限方面有不同之处
建议检查一下你的用户帐号和密码设置!
尤其是密码!
Top
2 楼JonasFeng(狂学.NET)回复于 2005-04-04 16:10:43 得分 0
应该是检查一下你访问SQL的帐号和密码是否与SQL中设置的一至!Top
3 楼zzzjaychung(追逐幸福的风筝)回复于 2005-04-04 16:33:51 得分 0
可以将连接做一个Adapter,
然后测试一下连接是否正常。
看这个报错,应该是你的连接出错了。Top
4 楼mycoldboy(寒潭清)回复于 2005-04-04 19:39:32 得分 0
[B][SIZE=20][COLOR=Magenta]winxp有内置防火墙拉[/COLOR][/SIZE][/B]Top
5 楼keini(菜岛)回复于 2005-04-04 21:09:20 得分 0
请问你装的是SQL什么版本阿?Top
6 楼Sun_Ukyo(橘子右京)回复于 2005-04-04 22:53:18 得分 0
其实有个简便方法的,在XP下的.net开发环境,打开服务器列表,直接拖个表进来
系统会自动生成connection和dataadapter的,有个测试按钮,
如果成功的话,你就看看它是怎么写的connectionstring.
希望能帮到你 :)Top




