I am getting a message of "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'."
The insert is quite lenghtly sixty one fields. Below is part of the code:
strInsert = "INSERT INTO tblResults ([Update Resp code], [TF Resp Code], TGSN, Update500, [Location A]," _
& " [Location Z], [Pulsing A], [Pulsing Z], [Traffic Class], [Traffic Use], Modifier, [Start Date]," _
& " [End Date], [Carrier Id], [New Resp Code]," _
& " [Update501], [Proj Code], [Growth Code A], [Growth Code Z]," _
& " [Treatment Code], [Conv Code], ECCS, [Blkg Obj], [Req Mo], [TS Conv Code]," _
& " [Update502], [A Leg 1], [A Leg 1 Pct Ofl], [A Leg 2], [A Leg 2 Pct Ofl], [A Leg 3], [A Leg 3 Pct Ofl]," _
& " [A Cluster Final]," _
& " [Update503], [Z Leg 1], [Z Leg 1 Pct Ofl], [Z Leg 2], [Z Leg 2 Pct Ofl], [Z Leg 3], [Z Leg 3 Pct Ofl]," _
& " [Z Cluster Final]," _
& " [Update504], [Other TGID]," _
& " [Update505], [Stated Req Trks], [Proj Ratio]," _
& " [Update510], [Trunks In Svc], [Cond Cd], [Cnst Cat], Use, [A Own], [Z Own], [Min Pri CCS], [Mod Eng Code]," _
& " [Stim Fac], [Other Trks], [Other CCS], [Rpt Ex Ind], [TS Resp Code], [Orig TS Resp Code])" _
& " Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
Using cmd As New OleDbCommand(strInsert, cnn)
cmd.CommandText = CommandType.Text."
end etc.
cmd.Parameters.AddWithValue("Orig TS Resp Code", m_DownLoadRequest.OrigTSRespCode)
cmd.ExecuteNonQuery()
I did not include all the fields under the Using cmd.
I am using a similar INSERT but not as many fields and I had not problem.
So, can someone direct me to where I can find more information of this error.
Thanks
The insert is quite lenghtly sixty one fields. Below is part of the code:
strInsert = "INSERT INTO tblResults ([Update Resp code], [TF Resp Code], TGSN, Update500, [Location A]," _
& " [Location Z], [Pulsing A], [Pulsing Z], [Traffic Class], [Traffic Use], Modifier, [Start Date]," _
& " [End Date], [Carrier Id], [New Resp Code]," _
& " [Update501], [Proj Code], [Growth Code A], [Growth Code Z]," _
& " [Treatment Code], [Conv Code], ECCS, [Blkg Obj], [Req Mo], [TS Conv Code]," _
& " [Update502], [A Leg 1], [A Leg 1 Pct Ofl], [A Leg 2], [A Leg 2 Pct Ofl], [A Leg 3], [A Leg 3 Pct Ofl]," _
& " [A Cluster Final]," _
& " [Update503], [Z Leg 1], [Z Leg 1 Pct Ofl], [Z Leg 2], [Z Leg 2 Pct Ofl], [Z Leg 3], [Z Leg 3 Pct Ofl]," _
& " [Z Cluster Final]," _
& " [Update504], [Other TGID]," _
& " [Update505], [Stated Req Trks], [Proj Ratio]," _
& " [Update510], [Trunks In Svc], [Cond Cd], [Cnst Cat], Use, [A Own], [Z Own], [Min Pri CCS], [Mod Eng Code]," _
& " [Stim Fac], [Other Trks], [Other CCS], [Rpt Ex Ind], [TS Resp Code], [Orig TS Resp Code])" _
& " Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
Using cmd As New OleDbCommand(strInsert, cnn)
cmd.CommandText = CommandType.Text."
end etc.
cmd.Parameters.AddWithValue("Orig TS Resp Code", m_DownLoadRequest.OrigTSRespCode)
cmd.ExecuteNonQuery()
I did not include all the fields under the Using cmd.
I am using a similar INSERT but not as many fields and I had not problem.
So, can someone direct me to where I can find more information of this error.
Thanks