Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8664 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

FMP Import Experts,

I am using ODBC and SQL to UPDATE a FMP file and I can't seem to find out how to format a time field type to make FMP's ODBC driver happy.

I tried single quotes '12:00:00' and it didn't like that. I then tried the curly brackets (where did that little beauty come from? I have never heard of that in SQL before!) that made the time look like {12:00:00}, but this just caused an error that the data didn't appear to be a date (duh, that's because it is a time). The errors I get are below.

Is it possible to update a time value using SQL and ODBC? If so, how to I let the ODBC engine know that I am sending a time value? Am I supposed to convert it to an integer (like the number of seconds since 1-1-1970) or something?

Here is the KB article for reference:

http://tidb.filemaker.com/ti/FMPro?-db=ti.fp5&-lay=list&-sortfield=relevancecalc&-sortorder=descend&product=filemaker&article=import%20time&-token.0=filemakerimport%20time&-token.1 =168&-find=&-format=detail.html&-recid=12590445

You'll need to get that all on one line to get it to work in your browser. It distinctly says that for an INSERT you surround both the date and time types with curly brackets. Mysteriously, is leaves out the time type in the same statement about the UPDATE syntax...hmmm...

Below are the errors I am getting for reference. First the one where I use quotes:

UPDATE Test SET name_first = 'Mike',time_begin = '12:00:00' W

HERE number = '1'

DBD::ODBC::db prepare failed: [FileMaker][ODBC FileMaker Pro driver]An UPDATE ex

pression didn't match the data type of its corresponding column (SQL-37000)

Then when I use curly brackets:

UPDATE Test SET name_first = 'Mike',time_begin = {12:00:00} W

HERE number = '1'

DBD::ODBC::db prepare failed: [FileMaker][ODBC FileMaker Pro driver]Invalid date

value: 12?? (SQL-37000)

Michael

Posted

Hi,

I didn't see the ODBC forum. Maybe this needs to go there?

I won't cross post (not sure if that would be appreciated) but maybe the moderator can move it over there if he thinks it is necessary?

Michael

This topic is 8664 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.