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!

How update DB2.Timestamp from VFP

Status
Not open for further replies.

bobo123

Programmer
Oct 4, 2002
30
Hello everybody,
Please can anybody explain, how to update Timestamp field on DB2 via ODBC from VisualFoxPro. I connect to DB2, upload data to cursor, set SQLSETPROP() and can't update Timestamp field in BROWSE window. Any other field type is updatable properly !
Thanks for any idea
Sincerely
Bobo
 
My first thought was that your ODBC connection did not have the authority to perform updates, but your last sentence indicates that that is not the case.

Presumably, you can update other fields from your 'BROWSE window'. Are you getting back an error message, or is it just that the process does not perform the update? Are you using the correct 26 character format of the timestamp with all the dots and dashes in the right place?

Let us know the answer to these questions and we will try to help you further.

Marc
 
I get error "SQL ERROR" :eek:(
with options "Revert", "Cancel"

I hope I use correct format, respectively I try to change the field in browse in a format I can see. After changing any part of the (even to same value) I get the error.

Thanks a lot
Bobo
 
The DB2 timestamp is a 26 character field defined as YYCC-MM-DD-HH.MM.SS.hhhhhh

An example would be:
2003-09-15-15.33.43.315422

I would suggest putting a display of some sort into your program just immediately prior connecting to ODBC to ensure that your timestamp is what you think it is, and in the format mentioned above.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top