爱问知识人 爱问教育 医院库

sql数据连接问题

首页

sql数据连接问题

sql数据库在 中怎样连接(语句怎样写?)

提交回答
好评回答
  • 2007-03-08 15:22:40
       例子:
    1。在客户方(Html)代码中加入:
    
    
    
    2。在服务器方(Server)引用:
            Dim cn As New OleDb。OleDbConnection()
            cn。ConnectionString = "Provider=SQLOLEDB。
      1;Persist Security Info=True;User ID=sa;Password=;Initial Catalog=MyDataBase;Data Source= " cn。Open() Dim strSql As String, i As Integer, j As Integer strSql = "Select * From tTable " Dim rs As OleDb。
      OleDbDataReader Dim cmd As New OleDb。OleDbCommand(strSql, cn) rs = cmd。ExecuteReader While rs。
      Read() = True If IsDBNull(rs("FieldName")) Then txtName。Text = "" Else txtName。
      Text = rs("FieldName") End If 。。。 End While rs。Close() cn。Close() rs = Nothing cn = Nothing。
      

    D***

    2007-03-08 15:22:40

类似问题

换一换
  • 程序设计 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):