Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cant force DateTime to work with oracle TimeStamp

289 views
Skip to first unread message

shira...@wp.pl

unread,
Nov 13, 2007, 5:21:23 AM11/13/07
to
Hi,
Powerbuilder 9 and Oracle 10g.
I searched many forums and groups, still i havent found solution.
The problem is that i cant do any updates to database that includes
timestamp in where clause.

All lies is in miliseconds, which are truncated while setting value to
datetime column in PB. And it leads to famous
"Row changed between retrieve and update" while any update attempt
because oracle cant find timestamp with .000000 miliseconds (if i
delete miliseconds from row in oracle it works fine).
All columns that are dates or timestamps in oracle are presented as
datetime in PowerBuilder.
Ive edited datawindow source and hardtype "timestamp" instead od
datetime, everywhere oracle column is timestamp - but it changed above
error "Row changed between..." to "missing expr.." which is i belive
due to tsequal() function used in where clause.
Im using ODBC driver. Ive tried many odbc settings, played with
TimeStamp switch in PB and EditMask, and cant get this to work.
Please help.

Bruce Armstrong [TeamSybase]

unread,
Nov 13, 2007, 9:26:26 AM11/13/07
to

Pablo

unread,
Nov 13, 2007, 10:18:01 AM11/13/07
to
On 13 Lis, 15:26, "Bruce Armstrong [TeamSybase]"

<NOCANSPAM_bruce.armstr...@teamsybase.com> wrote:
> You might look at the TimeStamp DBParm parameter, which was added in
> 9.0.2:
>
> http://www.techno-kitten.com/Changes_to_PowerBuilder/New_In_PowerBuil...

Yes, i ve been there too.
>From what it says :

"Oracle 9i databases and the PowerBuilder O90 database interface
support a new Oracle Timestamp datatype. This datatype includes the
date and the time, including milliseconds. The existing Oracle Date
datatype does not include millisecond information. Use the TimeStamp
database parameter to determine whether PowerBuilder maps DateTime and
Time datatypes to the Oracle TimeStamp datatype (the default) or to
the Oracle Date datatype.

You can set this parameter on the Syntax page of the Database Profile
Setup dialog box for Oracle9i."

But in my case, TimeStamp is not working. Ive put it in my DBParm like
this:
SQLCA.DBParm =
"ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT',disablebind=1,ConnectString='DSN="+ls_database
+"; UID="+id+" ;PWD="+pw+"',TimeStamp='0'"
Unfortunatelly i see no difference between TimeStamp='0' and
TimeStamp='1' (default) - PowerBuilder update statement is the same in
both cases and show datetime like {ts "some date"}. Like it was
absolutely ignored!

But wait for the best: There is no such place in Syntax page to set
TimeStamp! Like its said in this article.

I m working on PowerBuilder 9.0.3 build 8836. And loosing my hope.
Anyway, Thanks Bruce.
I would appreciate any more help, very much.

Terry Dykstra

unread,
Nov 13, 2007, 10:48:47 AM11/13/07
to
You need to use the native O90 driver. With the ODBC driver that option is
not available.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://cas#express.sybase.com/cx/cx.stm (remove the # from the address)
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Pablo" <shira...@wp.pl> wrote in message
news:1194967081.1...@57g2000hsv.googlegroups.com...

Pablo

unread,
Nov 14, 2007, 3:13:52 AM11/14/07
to
Well, yeah. I knew it would came to that :)
Whats wrong with them ODBC drivers, anyway? Ive been through several
similar issues, like this timestamp issue here. Seems like there is no
sense in using oracle non-native drivers.

nilesh.u...@gmail.com

unread,
Mar 6, 2014, 5:39:25 AM3/6/14
to
Try this..
I fix this problem using this.

Set disablebind=1 in you ConnectOption

Thanks,
Nilesh Umaretiya
0 new messages