Man has this got me stumped.
I am importing records into a MySql table (in a grid with an action button)
using the Action Javascript "Import Data from Excel or Ascii file"
the offending field is a DATE type format. (offending is a mild term...)
No matter what I try, I keep getting this error.
Error. Error importing records. The error reported was: Database API specific error Your database has returned the following error code and description to Alpha Five. Consult your database documentation for further information. 1292 - 'Incorrect date value: '{01/07/2014}' for column 'Date' at row 1'
So I tried to use about all the functions I could in this Xbasic function
dim t as p
t = table.open(e.inputFilename)
t.batch_begin()
dim i as n
dim count as n
count = t.records_get()
for i = 1 to count
t.change_begin()
t.date = ctod(t.date) 'I have tried all the built in functions I could find. in the date time help section and although they did alter the error a little - nothing has worked to allow me to import any records. Including a blank value, and yes I have unchecked Honor Grid rules...
t.change_end(.t.)
t.fetch_next()
next i
t.batch_end()
t.close()
I am importing a CSV file and the date field contains a value 1/7/2014
I have tried to format it in excel as a date as well as a general format and as I said I have tried to convert a string, and many other variations of date time functions but cannot seem to import a date field in a MySql table.
Can anyone give me a clue here? MANY thanks in advance!
Also I tried to import without any xbasic first then tried the xbasic stuff.
Charles
I am importing records into a MySql table (in a grid with an action button)
using the Action Javascript "Import Data from Excel or Ascii file"
the offending field is a DATE type format. (offending is a mild term...)
No matter what I try, I keep getting this error.
Error. Error importing records. The error reported was: Database API specific error Your database has returned the following error code and description to Alpha Five. Consult your database documentation for further information. 1292 - 'Incorrect date value: '{01/07/2014}' for column 'Date' at row 1'
So I tried to use about all the functions I could in this Xbasic function
dim t as p
t = table.open(e.inputFilename)
t.batch_begin()
dim i as n
dim count as n
count = t.records_get()
for i = 1 to count
t.change_begin()
t.date = ctod(t.date) 'I have tried all the built in functions I could find. in the date time help section and although they did alter the error a little - nothing has worked to allow me to import any records. Including a blank value, and yes I have unchecked Honor Grid rules...
t.change_end(.t.)
t.fetch_next()
next i
t.batch_end()
t.close()
I am importing a CSV file and the date field contains a value 1/7/2014
I have tried to format it in excel as a date as well as a general format and as I said I have tried to convert a string, and many other variations of date time functions but cannot seem to import a date field in a MySql table.
Can anyone give me a clue here? MANY thanks in advance!
Also I tried to import without any xbasic first then tried the xbasic stuff.
Charles
Comment