serverUrl = readFromIni(My.Application.Info.DirectoryPath & "/config.dll", "Service Information", "IPAddress")

serverID = readFromIni(My " /> 三级在线不卡,日本videos高清hd,在线观看欧洲成人免费视频

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

asp.net連接數(shù)據(jù)庫 增加,修改,刪除,查詢代碼

復(fù)制代碼 代碼如下:
'數(shù)據(jù)庫連接
Public Sub connectionDB()
Try

serverUrl = readFromIni(My.Application.Info.DirectoryPath & "/config.dll", "Service Information", "IPAddress")

serverID = readFromIni(My.Application.Info.DirectoryPath & "/config.dll", "Service Information", "Password")
serverName = readFromIni(My.Application.Info.DirectoryPath & "/config.dll", "Service Information", "userID")
serverDataBase = readFromIni(My.Application.Info.DirectoryPath & "/config.dll", "Service Information", "DataBaseName")
If serverID <> "" Then
connectionSqlString = "server =" + serverUrl + ";Database=" + serverDataBase + ";uid =" + serverName + ";pwd=" + serverID + ";max pool size=500"
Else
connectionSqlString = "server =" & serverUrl & ";integrated security = SSPI ;database = " & serverDataBase & ""
End If
conSql = New SqlConnection(connectionSqlString)
objCommand.Connection = conSql
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub


'數(shù)據(jù)操作執(zhí)行
Public Sub getConn(ByVal SqlStr As String, ByVal TableName As String)
Try
objCommand.CommandText = SqlStr
objDataSet.Clear()
objDataAdapter.SelectCommand = objCommand
objDataAdapter.Fill(objDataSet, TableName)
Catch ex As Exception
errNo = 1
MsgBox(ex.Message)
End Try
End Sub
'數(shù)據(jù)更新
Public Sub updateTable(ByVal StrSql As String)
objCommand.CommandText = StrSql
Try
conSql.Open()
Trans = conSql.BeginTransaction
objCommand.Transaction = Trans
objCommand.ExecuteNonQuery()
Trans.Commit()
Catch ese As Exception
MsgBox(ese.Message)
Trans.Rollback() '如果更新異常則取消所有更新
Finally
conSql.Close() '關(guān)閉連接
End Try
End Sub

AspNet技術(shù)asp.net連接數(shù)據(jù)庫 增加,修改,刪除,查詢代碼,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产99精品视频 | 天天综合网天天综合色 | 一区视频在线播放 | 碰碰人人| 久久久精品国产四虎影视 | 四虎伊人 | 一本色道加勒比海在线 | 久久大香伊蕉在人线国产昨爱 | 久久精品国产久金国产思思 | 国产1区2区3区在线观看 | 四虎国产精品免费视 | 在线观看91精品国产不卡免费 | 国产精品成人网 | 日本精品一区二区三区视频 | 国产亚洲青色国产 | 国产成人亚洲精品影院 | 国产高清免费午夜在线视频 | 国产在线一区二区三区四区 | 免费午夜视频 | 欧美日韩亚洲国产一区二区三区 | 中国女人一级做受免费视频 | 一起射福利 | 伊人网狠狠干 | 美女精品一区二区 | 色婷婷亚洲十月十月色天 | 欧美成人三级伦在线观看 | 一级做a爰片性色毛片小说 一级做a爰片性色毛片新版的 | 亚洲精品午夜aaa级久久久久 | 亚洲国产精久久小蝌蚪 | 黄视频在线免费 | 国内精品视频免费观看 | 91久久麻豆| 香蕉久久一区二区三区 | 成人黄视频在线观看 | 欧美性巨大 | 国产精品自产拍在线观看 | 日本久久精品免视看国产成人 | 婷婷丁香九月 | 久久国产精品久久久 | 2021成人国产精品 | 四虎现在的网址入口 |