Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 5 of 5 total |
Inserting into time-field |
Mon, Aug 21 2006 8:06 PM | Permanent Link |
John | I am getting the following error :
DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Time expression but instead found ? in INSERT SQL statement This is my query : q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; q.Prepare; q.ParamByName('start').Astime := strtotime('12:00:00'); q.ExecSQL; Any ideas why this is happening ? |
Tue, Aug 22 2006 12:53 AM | Permanent Link |
"Johnnie Norsworthy" | "John" <eydunl@post.olivant.fo> wrote in message
news:245370DE-72D0-471A-B884-9E688BFD991F@news.elevatesoft.com... >I am getting the following error : > > DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Time > expression but instead > found ? in INSERT SQL statement > > This is my query : > > q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; > q.Prepare; > q.ParamByName('start').Astime := strtotime('12:00:00'); > q.ExecSQL; Is "-" allowed in a field name: "Time-start"? |
Tue, Aug 22 2006 1:04 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< This is my query : q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; q.Prepare; q.ParamByName('start').Astime := strtotime('12:00:00'); q.ExecSQL; Any ideas why this is happening ? >> Using AsTime should set the data type of the parameter appropriately. Try this and see if it corrects it: q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; q.ParamByName('start').DataType:=ftTime; q.Prepare; q.ParamByName('start').Astime := strtotime('12:00:00'); q.ExecSQL; -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Aug 22 2006 4:19 PM | Permanent Link |
John | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:
John, << This is my query : q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; q.Prepare; q.ParamByName('start').Astime := strtotime('12:00:00'); q.ExecSQL; Any ideas why this is happening ? >> Using AsTime should set the data type of the parameter appropriately. Try this and see if it corrects it: q.SQL.Text := 'INSERT INTO Log ([Time-start]) VALUES (:start)'; q.ParamByName('start').DataType:=ftTime; q.Prepare; q.ParamByName('start').Astime := strtotime('12:00:00'); q.ExecSQL; -- Tim Young Elevate Software www.elevatesoft.com Thank you for your suggestions. I tried both suggestions - but neither fixed the problem. I am still getting the same error message. --- John |
Wed, Aug 23 2006 3:41 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< Thank you for your suggestions. I tried both suggestions - but neither fixed the problem. I am still getting the same error message. >> Could you send me an example of this with the table (timyoung@elevatesoft.com) ? It would help immensely if I could run it here in the debugger. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |