主题:帮个小忙
Dim Cnn As New System.Data.OleDb.OleDbConnection
Dim Cmd As New System.Data.OleDb.OleDbCommand
Dim Sql As String
Sql = "insert into NR(Name,Note,Dat) values(' " & Name & "',' " & TextBox2.Text & "','" & Date.Today.Date & "')"
Cnn.ConnectionString = Pro
Cmd.Connection = Cnn
Cmd.CommandText = Sql
Cnn.Open()
Cmd.ExecuteNonQuery()
Cnn.Close()
总是提示INSERT INTO 有语法错误,但我也看不出错到哪里了?
Dim Cmd As New System.Data.OleDb.OleDbCommand
Dim Sql As String
Sql = "insert into NR(Name,Note,Dat) values(' " & Name & "',' " & TextBox2.Text & "','" & Date.Today.Date & "')"
Cnn.ConnectionString = Pro
Cmd.Connection = Cnn
Cmd.CommandText = Sql
Cnn.Open()
Cmd.ExecuteNonQuery()
Cnn.Close()
总是提示INSERT INTO 有语法错误,但我也看不出错到哪里了?