Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Datastore update building sql correctly pb11.1 db2 odbc

3 posts in DataWindow Last posting was on 2008-04-04 18:30:13.0Z
marci wilken Posted on 2008-04-03 18:06:31.0Z
Sender: 7f19.47f51ab9.1804289383@sybase.com
From: Marci Wilken
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Datastore update building sql correctly pb11.1 db2 odbc
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47f51ca7.7f3e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Apr 2008 10:06:31 -0800
X-Trace: forums-1-dub 1207245991 10.22.241.41 (3 Apr 2008 10:06:31 -0800)
X-Original-Trace: 3 Apr 2008 10:06:31 -0800, 10.22.241.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86594
Article PK: 415854

I have a webservice data object connecting to a DB2/AIX
database with ODBC that is not creating the update statement
correctly. When I do a preview of the syntax before and
after the update PB is inserting ? instead of the data
values. this is pulled from the syntax at sql preview
"UPDATE WFPRG.AJ_ATND_WEEK SET JAT_EXP_HRS_QN = ?,
JAT_ACT_HRS_QN = ? WHERE JAT_CLI_STP_IDN_NO = ? AND
JAT_WEEK_BEG_FD = ?

Here's the relevant code
u_datastore lds
dwitemstatus dis
llrc = of_connect()
if (llrc >= 0) then
lds = create u_datastore
lds.DataObject = "d_aj_atnd_week_update"
lds.SetTransObject(sqlca)
llrc =
lds.retrieve(ai_JAT_CLI_STP_IDN_NO,ad_JAT_WEEK_BEG_FD)
if llrc > 0 then
lds.object.JAT_EXP_HRS_QN[1] = ad_JAT_EXP_HRS_QN
lds.object.JAT_ACT_HRS_QN[1] = ad_JAT_ACT_HRS_QN
llrc = lds.update(true )
end if
destroy lds
of_disconnect()
end if


marci wilken Posted on 2008-04-03 18:23:24.0Z
Sender: 7f19.47f51ab9.1804289383@sybase.com
From: marci Wilken
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: it should say building sql INcorrectly
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47f5209c.7f8c.1681692777@sybase.com>
References: <47f51ca7.7f3e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Apr 2008 10:23:24 -0800
X-Trace: forums-1-dub 1207247004 10.22.241.41 (3 Apr 2008 10:23:24 -0800)
X-Original-Trace: 3 Apr 2008 10:23:24 -0800, 10.22.241.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86595
Article PK: 415856


> I have a webservice data object connecting to a DB2/AIX
> database with ODBC that is not creating the update
> statement correctly. When I do a preview of the syntax
> before and after the update PB is inserting ? instead of
> the data values. this is pulled from the syntax at sql
> preview "UPDATE WFPRG.AJ_ATND_WEEK SET JAT_EXP_HRS_QN = ?,
> JAT_ACT_HRS_QN = ? WHERE JAT_CLI_STP_IDN_NO = ? AND
> JAT_WEEK_BEG_FD = ?
>
> Here's the relevant code
> u_datastore lds
> dwitemstatus dis
> llrc = of_connect()
> if (llrc >= 0) then
> lds = create u_datastore
> lds.DataObject = "d_aj_atnd_week_update"
> lds.SetTransObject(sqlca)
> llrc =
> lds.retrieve(ai_JAT_CLI_STP_IDN_NO,ad_JAT_WEEK_BEG_FD)
> if llrc > 0 then
> lds.object.JAT_EXP_HRS_QN[1] = ad_JAT_EXP_HRS_QN
> lds.object.JAT_ACT_HRS_QN[1] = ad_JAT_ACT_HRS_QN
> llrc = lds.update(true )
> end if
> destroy lds
> of_disconnect()
> end if


Jason 'Bug' Fenter [TeamSybase] Posted on 2008-04-04 18:30:13.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Datastore update building sql correctly pb11.1 db2 odbc
References: <47f51ca7.7f3e.1681692777@sybase.com>
In-Reply-To: <47f51ca7.7f3e.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47f673b5$1@forums-1-dub>
Date: 4 Apr 2008 10:30:13 -0800
X-Trace: forums-1-dub 1207333813 10.22.241.152 (4 Apr 2008 10:30:13 -0800)
X-Original-Trace: 4 Apr 2008 10:30:13 -0800, vip152.sybase.com
Lines: 35
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86606
Article PK: 415867

The question mark represents a "bound" variable. I know the syntax looks
weird, but have you verified that the data in the database is not
getting updated? (Some databases and drivers do support this syntax.) If
it isn't, try adding "DISABLEBIND=1" to your DBParm. (You can Google
these groups for "DisableBind" to find more information.)

Marci Wilken wrote:
> I have a webservice data object connecting to a DB2/AIX
> database with ODBC that is not creating the update statement
> correctly. When I do a preview of the syntax before and
> after the update PB is inserting ? instead of the data
> values. this is pulled from the syntax at sql preview
> "UPDATE WFPRG.AJ_ATND_WEEK SET JAT_EXP_HRS_QN = ?,
> JAT_ACT_HRS_QN = ? WHERE JAT_CLI_STP_IDN_NO = ? AND
> JAT_WEEK_BEG_FD = ?
>
> Here's the relevant code
> u_datastore lds
> dwitemstatus dis
> llrc = of_connect()
> if (llrc >= 0) then
> lds = create u_datastore
> lds.DataObject = "d_aj_atnd_week_update"
> lds.SetTransObject(sqlca)
> llrc =
> lds.retrieve(ai_JAT_CLI_STP_IDN_NO,ad_JAT_WEEK_BEG_FD)
> if llrc > 0 then
> lds.object.JAT_EXP_HRS_QN[1] = ad_JAT_EXP_HRS_QN
> lds.object.JAT_ACT_HRS_QN[1] = ad_JAT_ACT_HRS_QN
> llrc = lds.update(true )
> end if
> destroy lds
> of_disconnect()
> end if