Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
VB
fstatus = "NULL"
                           tdl = "INSERT INTO temptdl VALUES(@fbankcode,@fbranchcode,@fdate,@fbal1,@fbal2,@fbal3,@fbal4,@fbal5,@fbal6,@fbal7,@fbal8,@fbal9,@fbal10,@fbal11,@fbal2@fbal3,@fbal14,@fbal15,@fbal16,@fbal17,@fbal18,@fbal19,@fbal20,@fbal21,@fbal22,@fbal23,@fbal24,@fbal25,@fbal26,@fbal27,@fbal28,@fbal29,@fbal30,@fstatus,@fuser,@fpassed,@fsyspassed,@fpass,@fworkstent,@fworkstpassed)"
                           Dim cmdtdlr As New SqlClient.SqlCommand(tdl, connDB)
                           cmdtdlr.Parameters.AddWithValue("@fbankcode", gbankid)
                           cmdtdlr.Parameters.AddWithValue("@fbranchcode", gbranchid)
                           cmdtdlr.Parameters.AddWithValue("@fdate", tdate)
                           cmdtdlr.Parameters.AddWithValue("@fbal1", fbal1)
                           cmdtdlr.Parameters.AddWithValue("@fbal2", fbal2)
                           cmdtdlr.Parameters.AddWithValue("@fbal3", fbal3)
                           cmdtdlr.Parameters.AddWithValue("@fbal4", fbal4)
                           cmdtdlr.Parameters.AddWithValue("@fbal5", fbal5)
                           cmdtdlr.Parameters.AddWithValue("@fbal6", fbal6)
                           cmdtdlr.Parameters.AddWithValue("@fbal7", fbal7)
                           cmdtdlr.Parameters.AddWithValue("@fbal8", fbal8)
                           cmdtdlr.Parameters.AddWithValue("@fbal9", fbal9)
                           cmdtdlr.Parameters.AddWithValue("@fbal10", fbal10)
                           cmdtdlr.Parameters.AddWithValue("@fbal11", fbal11)
                           cmdtdlr.Parameters.AddWithValue("@fbal12", fbal12)
                           cmdtdlr.Parameters.AddWithValue("@fbal13", fbal13)
                           cmdtdlr.Parameters.AddWithValue("@fbal14", fbal14)
                           cmdtdlr.Parameters.AddWithValue("@fbal15", fbal15)
                           cmdtdlr.Parameters.AddWithValue("@fbal16", fbal16)
                           cmdtdlr.Parameters.AddWithValue("@fbal17", fbal17)
                           cmdtdlr.Parameters.AddWithValue("@fbal18", fbal18)
                           cmdtdlr.Parameters.AddWithValue("@fbal19", fbal19)
                           cmdtdlr.Parameters.AddWithValue("@fbal20", fbal20)
                           cmdtdlr.Parameters.AddWithValue("@fbal21", fbal21)
                           cmdtdlr.Parameters.AddWithValue("@fbal22", fbal22)
                           cmdtdlr.Parameters.AddWithValue("@fbal23", fbal23)
                           cmdtdlr.Parameters.AddWithValue("@fbal24", fbal24)
                           cmdtdlr.Parameters.AddWithValue("@fbal25", fbal25)
                           cmdtdlr.Parameters.AddWithValue("@fbal26", fbal26)
                           cmdtdlr.Parameters.AddWithValue("@fbal27", fbal27)
                           cmdtdlr.Parameters.AddWithValue("@fbal28", fbal28)
                           cmdtdlr.Parameters.AddWithValue("@fbal29", fbal29)
                           cmdtdlr.Parameters.AddWithValue("@fbal30", fbal30)
                           cmdtdlr.Parameters.AddWithValue("@fstatus", fstatus)
                           cmdtdlr.Parameters.AddWithValue("@fuser", Guser)
                           cmdtdlr.Parameters.AddWithValue("@fpassed", Guser)
                           cmdtdlr.Parameters.AddWithValue("@fsyspassed", serverdt)
                           cmdtdlr.Parameters.AddWithValue("@fpass", "Y")
                           cmdtdlr.Parameters.AddWithValue("@fworkstent", worknode)
                           cmdtdlr.Parameters.AddWithValue("@fworkstpassed", worknode)
                           cmdtdlr.ExecuteNonQuery()
                           'Catch ex As Exception
                           '    MessageBox.Show("insertion error at TEMPTDL", "CHECK")
                           '    Exit Sub
                           'End Try
                       End If
Posted

1 solution

Hi,

Comma is missing between @fbal2 and @fbal3

Please replace Insert statement line with below code: (I have highlighted the changed part with bold fonts)

SQL
"INSERT INTO temptdl VALUES(@fbankcode,@fbranchcode,@fdate,@fbal1,@fbal2,@fbal3,@fbal4,@fbal5,@fbal6,@fbal7,@fbal8,@fbal9,@fbal10,@fbal11,@fbal2,@fbal3,@fbal14,@fbal15,@fbal16,@fbal17,@fbal18,@fbal19,@fbal20,@fbal21,@fbal22,@fbal23,@fbal24,@fbal25,@fbal26,@fbal27,@fbal28,@fbal29,@fbal30,@fstatus,@fuser,@fpassed,@fsyspassed,@fpass,@fworkstent,@fworkstpassed)"


Please le tme know if you have any concern or query or if you are getting the same error.

Thanks
 
Share this answer
 
Comments
lakshjoshi 26-Aug-15 7:25am    
Thank you @Advay Pandya ,nice caught...:),now i have to check up my eyes..:)
Advay Pandya 26-Aug-15 7:26am    
Always welcome. It happens in the coding world. We developers are not able to find small mistakes of their own code. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900