PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: eldonfsr on November 29, 2020, 08:13:50 PM

Title: invalid Operand for operator <Assigment>
Post by: eldonfsr on November 29, 2020, 08:13:50 PM
I have this sql statements to ejecute  but send that error

 INSERT INTO PO5_ReceiptEntryHeader ( vendornumber , ReceiptNumber ,  batchnumber , ReceiptType ,InvoiceNumber,InvoiceDate,InvoiceDueDate,PurchaseOrderNumber,TaxableAmount)
VALUES(                               'CONT'     ,'064509'       , '00011'      ,'I'          ,' CAESC7796'  ,'10/29/2020','11/28/2020','T11499   ','     430.45')

i using c# i dont know if i have to use " or ' to in close value or is wrong date format .

please help me thanks.
 


Title: Re: invalid Operand for operator <Assigment>
Post by: Devon Austen on November 30, 2020, 09:30:44 AM
The date format is 'YYYY-MM-DD'.

If you are using a version of the ODBC driver earlier then version 6 you have to use the escaped date format {d 'YYYY-MM-DD'}. Versions after 6 can use either the escaped format or just the date string.

The ODBC driver uses single quotes to enclose string values including date strings.