 |
|
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Conn.Open()
sql = "insert into factory1(ID Code,Plt Bld Id,Tsic Id,Id No,Number Factory,Type code factory,Industry,Corporate Name,Factory_Building,Trader,Name Contract,Date control,Acc responsible,Address,Address Estate,Group,Road,District,Zone,Province,Post Code,Number,NumberFax,Expr1014,Transformer size (kVA) SUM,Size kW approval SUM)
values ('" & t1.Text & "','" & t2.Text & "','" & t3.Text & "','" & t4.Text & "','" & t5.Text & "','" & t6.Text & "','" & t7.Text & "','" & t8.Text & "','" & t9.Text & "','" & t10.Text & "','" & t11.Text & "','" & t12.Text & "','" & t13.Text & "','" & t14.Text & "','" & t15.Text & "','" & t16.Text & "','" & t17.Text & "','" & t18.Text & "','" & t19.Text & "','" & t20.Text & "','" & t21.Text & "','" & t22.Text & "','" & t23.Text & "','" & t24.Text & "','" & t25.Text & "','" & t26.Text & "','" & t27.Text & "')"
cmd = New OleDbCommand(sql, Conn)
cmd.ExecuteNonQuery()
Conn.Close()
End Sub
มันขึ้น error ว่า syntax error in INSERT INTO statement. error ตรงนี้อ่ะคัฟ cmd.ExecuteNonQuery()
อยากทรายว่าต้องแก้ตรงไหนคับ
ขอบพระคุณมากคับ
Tag : VS 2008 (.NET 3.x)
|
|
 |
 |
 |
 |
Date :
2011-02-25 17:22:24 |
By :
mixdeatnote |
View :
1087 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |