× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The "%date(smcpd:*ISO)" portion creates a date field.

If isotimestmp is defined as a timestamp field you need to wrap that code with %timestamp.

isotimestmp = %timestamp(%date(smcpd:*ISO));

Troy

-----Original Message----- From: Smith, Mike ; Smith, Mike
Sent: Friday, April 12, 2013 7:37 AM
To: RPG programming on the IBM i / System i (rpg400-l@xxxxxxxxxxxx)
Subject: jdbc_setTimeStamp issue

We are updating a file in SQL Server that has a Date/Time Field.
We really aren't interested in the Time portion of the field, so I have been only loading the date into the time stamp


When I run
isotimestmp = %date(smcpd:*ISO) ;
JDBC_SetTimeStamp(stmt:1:isotimestmp);
rc = JDBC_ExecPrepUpd(stmt);

I check RC and it is 3, which is the number of records that should be updated.
However when I check the table in SQL Server, the records have not been updated.

If I do
JDBC_SetTimeStamp(stmt:1:%timestamp);
Rc=JDBC_ExecPrepUpd(stmt);

I check RC and it is 3 and the records have been updated with the current time stamp.

Any idea what is going on?


FWIW we are looking at changing the SQL Server field to be a Date field, but I would like to understand what is happening anyway.

Mike
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.