public class contacts
dim mydt as new datatable
Private Sub Contact_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With mydt
Dim cmd As New SqlCommand("Select * from Contacts", con)
Dim adapter As New SqlDataAdapter(cmd)
adapter.Fill(mydt)
.AcceptChanges()
.DefaultView.RowFilter = "([Unique id],Prefix,[First name],[Last name],Gender,Title,Company,Phone,Mobile,Fax,[b.email],[p.email],Reference,Address,[Address 2],Country,City,Zip,Facebook,GooglePlus,Instagram,Twitter,Website,Salary,Currency,[Group],[Id/Status],Note,[Added by]) LIKE '*'"
End With
userdatagrid.DataSource = mydt.DefaultView
我得到"表达式附近的语法错误"在行
.DefaultView.RowFilter = "([Unique id],Prefix,[First name],[Last name],Gender,Title,Company,Phone,Mobile,Fax,[b.email],[p.email],Reference,Address,[Address 2],Country,City,Zip,Facebook,GooglePlus,Instagram,Twitter,Website,Salary,Currency,[Group],[Id/Status],Note,[Added by]) LIKE '*'"
我该如何解决这个问题? 或者我如何从sql数据库填充数据表?