S
scorpion53061
This is a windows vb.net app that is using SQL Server.
I have 1(one) customer who receives this error out of the 400 or so that use
this software. The error and statement are below. I also know this user has
a very slow internet connection but I dont think it is a result of this. Any
ideas?
sql2 = "SELECT GETDATE() AS TIMEOFENTRY,custno, DATEOR, ORDERNO, LN, custpo,
ITEMNO, QTY, PRICE, UM, totprice, QTYALL, QTYBACK, SLSMNO, INIT FROM jjk044
where custno = " + custno + " and " + Selection + " order by " + S + ""
S is
If ComboBox2.Text = "Ticket Number" Then
S = "orderno"
End If
more choices like this availabile.
Error is:
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'by'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at jjk_Software.fmopen.Button1_Click(Object
sender, EventArgs e)
I have 1(one) customer who receives this error out of the 400 or so that use
this software. The error and statement are below. I also know this user has
a very slow internet connection but I dont think it is a result of this. Any
ideas?
sql2 = "SELECT GETDATE() AS TIMEOFENTRY,custno, DATEOR, ORDERNO, LN, custpo,
ITEMNO, QTY, PRICE, UM, totprice, QTYALL, QTYBACK, SLSMNO, INIT FROM jjk044
where custno = " + custno + " and " + Selection + " order by " + S + ""
S is
If ComboBox2.Text = "Ticket Number" Then
S = "orderno"
End If
more choices like this availabile.
Error is:
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'by'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at jjk_Software.fmopen.Button1_Click(Object
sender, EventArgs e)