C
Carl
Can you tell me what is wrong with this syntax ?
string select = "UPDATE [PME].[dbo].[Expense] " +
"([ID],[ClientID],[Total],[TPS],[TVQ],[Gtotal],[DateFAC],
[DatePAY],[Description],[fl_type],[fl_status],
[fl_category],[fl_source],[defaut], [Cheque],
[fl_taxable], [notaxe], [id]) " +
" VALUES
(@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
@description,@fltype,@flstatus,@flcategory,@flsource,@defa
ut,@cheque,@fltaxable,@notaxe,@id) " +
" WHERE id = @id";
I receive the following error,
Additional information:
System.Web.Services.Protocols.SoapException: Server was
unable to process request. --->
System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near '('.
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WS_PME.DB.SqlGenericExecute(String sqlquery, String
tablename, String ConfigConnectionKey, String fonction,
Object[,] aParameter) in F:\Structure\Projets\VS2003
\PME\WS_PME\Components\DB_dataset.cs:line 181
at WS_PME.DB.Update_Expense(String vClientID, Decimal
vTotal, Decimal vTPS, Decimal vTVQ, Decimal vGtotal,
DateTime vDateFac, DateTime vDatePay, String
vDescription, Int32 vFlType, Int32 vFlStatus, Int32
vFlCategory, Int32 vFlSource, Boolean vDEFAUT, String
vCheque, Int32 vTAXABLE, Decimal vNoTaxe, Guid vID) in
F:\Structure\Projets\VS2003
\PME\WS_PME\Components\DB_dataset.cs:line 298
at WS_PME.WSPME.UpdateExpense(String vClientID,
Decimal vTotal, Decimal vTPS, Decimal vTVQ, Decimal
vGtotal, DateTime vDateFac, DateTime vDatePay, String
vDescription, Int32 vFlType, Int32 vFlStatus, Int32
vFlCategory, Int32 vFlSource, Boolean vDEFAUT, String
vCHEQUE, Int32 vTAXABLE, Decimal vNoTaxe, Guid vID) in
F:\Structure\Projets\VS2003\PME\WS_PME\PME.asmx.cs:line 99
--- End of inner exception stack trace ---
string select = "UPDATE [PME].[dbo].[Expense] " +
"([ID],[ClientID],[Total],[TPS],[TVQ],[Gtotal],[DateFAC],
[DatePAY],[Description],[fl_type],[fl_status],
[fl_category],[fl_source],[defaut], [Cheque],
[fl_taxable], [notaxe], [id]) " +
" VALUES
(@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
@description,@fltype,@flstatus,@flcategory,@flsource,@defa
ut,@cheque,@fltaxable,@notaxe,@id) " +
" WHERE id = @id";
I receive the following error,
Additional information:
System.Web.Services.Protocols.SoapException: Server was
unable to process request. --->
System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near '('.
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WS_PME.DB.SqlGenericExecute(String sqlquery, String
tablename, String ConfigConnectionKey, String fonction,
Object[,] aParameter) in F:\Structure\Projets\VS2003
\PME\WS_PME\Components\DB_dataset.cs:line 181
at WS_PME.DB.Update_Expense(String vClientID, Decimal
vTotal, Decimal vTPS, Decimal vTVQ, Decimal vGtotal,
DateTime vDateFac, DateTime vDatePay, String
vDescription, Int32 vFlType, Int32 vFlStatus, Int32
vFlCategory, Int32 vFlSource, Boolean vDEFAUT, String
vCheque, Int32 vTAXABLE, Decimal vNoTaxe, Guid vID) in
F:\Structure\Projets\VS2003
\PME\WS_PME\Components\DB_dataset.cs:line 298
at WS_PME.WSPME.UpdateExpense(String vClientID,
Decimal vTotal, Decimal vTPS, Decimal vTVQ, Decimal
vGtotal, DateTime vDateFac, DateTime vDatePay, String
vDescription, Int32 vFlType, Int32 vFlStatus, Int32
vFlCategory, Int32 vFlSource, Boolean vDEFAUT, String
vCHEQUE, Int32 vTAXABLE, Decimal vNoTaxe, Guid vID) in
F:\Structure\Projets\VS2003\PME\WS_PME\PME.asmx.cs:line 99
--- End of inner exception stack trace ---