Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEDB Error Code = 170 1

Status
Not open for further replies.

MikeBronner

Programmer
May 9, 2001
756
US
Hi guys,
I'm getting an SQL error from CF that I can't seem to resolve:



Code:
A detailed diagnostic follows:
OLEDB Error Code = 170
Line 25: Incorrect syntax near ','.

SQL = "INSERT INTO turnover VALUES ( '10/21/2002', '3rd Shift', 6, 'None.', 'Outstanding for CA.', 'Sorter 4: Cycle Sorter 11: CA-Paid Sorter 12: CA-Paid Sorter 14: Outclearings Sorter 15: Outclearings Sorter 16: MTS FIP Sorter 17: Outclearings', 'Completed at 1:38 a.m.', 53, 'Done', '9:38 p.m.', 103, 'Done', '10:05 p.m.', 133, 'Sorting Last pocket', '7:34 a.m.', , '', '', 1, '', '7:54 am', 5076, , '', '', , , '', '', , , '', '', , , '', '', , , '', '', , , '', '', , '3:30 a.m.', '4:59 a.m.', '2:19 a.m.', 'Capturing', '5:25 a.m.', '5:45 a.m.', '5:24 a.m.', '2:12 a.m.', '7:02 a.m.', '1:23 a.m.', '3:54 a.m.', '3:12 a.m.', '3:02 a.m.', 'Reconciling', 'Reconciling', 'Rack', 'Completed', 'Reconciling', 'Reconciling', '6:00', 'Reconciling', 'Reconciling', 'Rack', 'Reconciling', 'Reconciling')"

Data Source = "AID0181_SWIP"

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (99:3) to (99:44) in the template file D:\MUIRTRAIL\AID-0181\HTML\DART\TURNOVERS\SAVE_TO.CFM.



Does anyone have more info on this error? The SQL syntax seems right to me (those fields without apostrophes are declared as INT in the database).

Thanks! Take Care,
Mike
 
hi
i just saw you had null value for some data other than string you must put NULL in your query instead of nothing it should solve your problem

SQL = "INSERT INTO turnover VALUES ( '10/21/2002', '3rd Shift', 6, 'None.', 'Outstanding for CA.', 'Sorter 4: Cycle Sorter 11: CA-Paid Sorter 12: CA-Paid Sorter 14: Outclearings Sorter 15: Outclearings Sorter 16: MTS FIP Sorter 17: Outclearings', 'Completed at 1:38 a.m.', 53, 'Done', '9:38 p.m.', 103, 'Done', '10:05 p.m.', 133, 'Sorting Last pocket', '7:34 a.m.', NULL, '', '', 1, '', '7:54 am', 5076, NULL, '', '', NULL, NULL, '', '', NULL, NULL, '', '', NULL, NULL, '', '', NULL, NULL, '', '', NULL, NULL, '', '', NULL, '3:30 a.m.', '4:59 a.m.', '2:19 a.m.', 'Capturing', '5:25 a.m.', '5:45 a.m.', '5:24 a.m.', '2:12 a.m.', '7:02 a.m.', '1:23 a.m.', '3:54 a.m.', '3:12 a.m.', '3:02 a.m.', 'Reconciling', 'Reconciling', 'Rack', 'Completed', 'Reconciling', 'Reconciling', '6:00', 'Reconciling', 'Reconciling', 'Rack', 'Reconciling', 'Reconciling')"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top