这是我的代码:
Imports System.Data
Imports System.Data.SqlClient
Public Class Form2
Private conn As New SqlConnection("Data Source=wal1sql1;Initial Catalog=ValueTracker;Integrated Security=True")
Private da As SqlDataAdapter("SELECT * FROM tbl ValueSources", cs)
Private ds As DataSet
'Declaration
Public Property AllowDBNull As Boolean
Private Sub AddNullAllowedColumn()
Dim column As DataColumn
column = New DataColumn("ValueSourceID", _
System.Type.GetType("System.Int32"))
column.AllowDBNull = True
' Add the column to a new DataTable.
Dim table As DataTable
table = New DataTable
table.Columns.Add(column)
End Sub
Private Sub ValueSourcesBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles ValueSourcesBindingNavigatorSaveItem.Click
Me.Validate()
Me.TableAdapterManager.UpdateAll(Me.ValueTrackerDataSet)
Me.ValueSourcesBindingSource.EndEdit()
End Sub
我得到了错误Private da As SqlDataAdapter("SELECT * FROM tbl ValueSources", cs)