标题:未发现数据源名称
只看楼主
xywnhy
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2010-4-8
结帖率:33.33%
 问题点数:0 回复次数:2 
未发现数据源名称
提示我:未发现数据源名称,未指定默认驱动程序

Dim conn As ADODB.Connection
  Dim rst As ADODB.Recordset
  
  Set conn = New ADODB.Connection
  conn.ConnectionString = "priovider=sqloledb;driver=(sql server);" + _
     "server=WWW-D4CC14DD61C;uid=sa;pwd=xywnhy2005;database=wudianchangyong"
  conn.Open

  Set rst = New ADODB.Recordset
  Set rst.ActiveConnection = conn
  rst.CursorLocation = adUseClient
  rst.CursorType = adOpenDynamic
  rst.LockType = adLockPessimistic
  rst.Open "select d.xinghao,d.zuzhi" + _
            "from dianzu d" + _
            "where d.xinghao=d.xinghao and d.zuzhi=d.zuzhi" + _
            "order by d.xinghao"
  rst.MoveFirst
  Text1.Text = "xinghao   zuzhi" + Chr(13) + Chr(10)
  While Not rst.EOF
     Text1.Text = Text1.Text + rst.Fields(0) + " " + _
     Format(rst.Fields(2), "###") + Chr(13) + Chr(10)
     rst.MoveNext
  Wend

  Set rst = Nothing
  Set conn = Nothing



急求啊~~~~~~~~~·,小弟新手,谢过~~~~~~~~~~~~··
搜索更多相关主题的帖子: 名称 数据源 
2010-04-12 12:05
czyzhuo
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:17
帖 子:230
专家分:1459
注 册:2010-3-11
得分:0 
conn.ConnectionString = "priovider=sqloledb;driver=(sql server);" + _
     "server=WWW-D4CC14DD61C;uid=sa;pwd=xywnhy2005;database=wudianchangyong"
連接字符串有錯
2010-04-12 13:01
xywnhy
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2010-4-8
得分:0 
3Q
2010-04-12 13:20



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-302657-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.240617 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved