connect to sql server
Posted: Mon Mar 16, 2009 10:15 am
I tried an other code:
If running got to the "connection.Open()" line, I got the following error message:
Declaration expected. (BC30188) - C:\Documents and Settings\bbako\Desktop\posta\posta1\posta1\Recording1.vb:30
Code: Select all
Dim connetionString As String = "Data Source=ServerName;Initial Catalog=posta;"
Dim connection As SqlConnection = New SqlConnection(connetionString)
Dim command As SqlCommand
Dim adapter As New SqlDataAdapter
Dim ds As New DataSet
Dim i As Integer
Dim sql As String
connection.Open()
Declaration expected. (BC30188) - C:\Documents and Settings\bbako\Desktop\posta\posta1\posta1\Recording1.vb:30