阅读背景:

使用VB .net从Sqlserver db中检索记录

来源:互联网 

Here is what I'm working with:

这是我正在使用的:

Dim connstr = "data source=mydatasource;initial catalog=gcs_dw;persist security   info=True;user id=myuser;password=mypassword;Asynchronous Processing=True"
Dim sqlquery = "SELECT * FROM Customer WHERE CITY = 'Anytown'"
Dim connection As SqlConnection = New SqlConnection(connstr)
connection.Open()

Dim command As SqlCommand = connection.CreateCommand()
command.CommandText = sqlquery
Dim reader As SqlDataReader = command.ExecuteReader()
reader.Read()
Console.WriteLine(reader.ToString)
connection.Close()
Console.Read()
Di



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: