Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Filemaker 7 ODBC Select
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 24th February 11:17
andy
External User
 
Posts: 1
Default Filemaker 7 ODBC Select



Hi all,

After getting my code working with FM 6 and ODBC, i'm now trying to
update my database code to talk to FM 7. I'm having a weird problem
with a date field though.

I can insert a date using a query like so:

INSERT INTO FMTable( Text1, Amount, Time1, Date1, Text2 ) VALUES( 'text
235', 235.325, { T '11:23:22' }, { D '2005-04-03' }, NULL )

Time1 being a Time, and Date1 being a date field..

The problem is when i attemp to update Date1; it updates, but when its
read back, it comes as a null.

any ideas?

Thanks
Andy
  Reply With Quote


  sponsored links


2 24th February 11:17
andy
External User
 
Posts: 1
Default Filemaker 7 ODBC Select



Ok, this seems to be what the problem was...

UPDATE FMTable SET Date1 = { D '2004-01-01' } WHERE ID = 5

For some reason, if i had FM 7 developer open (so i could see the
chagnes to the data in the table), that statement set the date field to
?. Why the same format worked when the data was inserted is beyond
me...but using that date format for an update doesn't work.

The solution was to use DATE '2004-01-04'

Andy
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666