ASP.NET Connecting Suplavings for SQL Database

zhaozj2021-02-16  67

Dim MyConnection As SqlClient.sqlConnection Dim MyCommand As Sqlclient.sqlCommand Dim MyReader As SqlClient.sqlDataReader Dim Strsql As String Dim Connstr AS String

strsql = "SELECT P_NAME FROM M_PLOR" Connstr = "Server = wherever; packet size = 4096; user ID = sa; password =" sa "; data source = ISO2; PERSIST SECU" & _ "RITY INFO = FALSE; Initial Catalog = "wuye"

MyConnection = New Sqlclient.sqlConnection (connStr) MyConnection.Open () mycommand = new sqlclient.sqlcommand (strsql, myconnection)

MyReader = MyCommand.executeReader

Dim n as integer n = myReader.fieldcount

Dim Str As String

ShipMethod.DataSource = MyReader shipMethod.DATABIND ()

转载请注明原文地址:https://www.9cbs.com/read-16947.html

New Post(0)