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.

SQL 11.0.1 issues in PB9.03

3 posts in DataWindow Last posting was on 2009-08-28 18:38:08.0Z
Mark Posted on 2009-08-26 17:44:02.0Z
Sender: 40e2.4a942e3d.1804289383@sybase.com
From: Mark
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: SQL 11.0.1 issues in PB9.03
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a957462.655.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Aug 2009 10:44:02 -0700
X-Trace: forums-1-dub 1251308642 10.22.241.41 (26 Aug 2009 10:44:02 -0700)
X-Original-Trace: 26 Aug 2009 10:44:02 -0700, 10.22.241.41
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89833
Article PK: 419021

Hello all...I have a dwo that has a SQL Select statement
with
the followings lines:

SELECT "dba"."judge"."judg_person_id" ,
"dba"."judge"."last_name" ,
"dba"."judge"."first_name" ,
"dba"."judge"."middle_name" ,
"dba"."judge"."pers_job_title",
"dba"."judge"."comment"
FROM "dba"."judge"
WHERE ( "dba"."judge"."judg_person_id" = :ra_judge_id )

The SELECT statement works fine in the dwo...but when I try
to do an insert in the dwo from the PowerBuilder window, I
get:

A database error has occurred.

Database error code: -131

Database error message:
SQLSTATE=37000 [Sybase][ODBC Driver][SQL Anywhere] Syntax
error near 'comment' on line 1

No changes made to database.

INSERT INTO
judge(judg_person_id,last_name,first_name,middle_name
pers_job_title,comment) VALUES(??????)

I understand that the column "comment" is a reserved word in
SQLAnywhere 11.0.1, but I have it double quoted above. Also,
in DB Profile, I have the "Enclose Table and Column Names in
Quotes" checked with an Identifier Quote Character = '"'.
Any clue as to what is causing this issue? Any info would be
greatly appreciated...:)


Chis Keating (Sybase iAnywhere) Posted on 2009-08-27 19:35:06.0Z
From: "Chis Keating (Sybase iAnywhere)" <keating_nospam@sybase.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: SQL 11.0.1 issues in PB9.03
References: <4a957462.655.1681692777@sybase.com>
In-Reply-To: <4a957462.655.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: <4a96dfea$1@forums-1-dub>
Date: 27 Aug 2009 12:35:06 -0700
X-Trace: forums-1-dub 1251401706 10.22.241.152 (27 Aug 2009 12:35:06 -0700)
X-Original-Trace: 27 Aug 2009 12:35:06 -0700, vip152.sybase.com
Lines: 52
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89844
Article PK: 419032

I don't have PB9.0.3 to test but I cannot reproduce this behaviour in a
more current version of PB. You should not need to use the
IdentifierQuoteChar unless you plan to deviate from the default quote
character.

Can you post your connection code for review? Also, I would be helpful
to see what the value of the transaction object DBParm at runtime so
that you can verify the settings i.e., add a edit box to the application
and assign it the value of the dbparm as in:

sle_1.text = SQLCA.DBParm

Mark wrote:
> Hello all...I have a dwo that has a SQL Select statement
> with
> the followings lines:
>
> SELECT "dba"."judge"."judg_person_id" ,
> "dba"."judge"."last_name" ,
> "dba"."judge"."first_name" ,
> "dba"."judge"."middle_name" ,
> "dba"."judge"."pers_job_title",
> "dba"."judge"."comment"
> FROM "dba"."judge"
> WHERE ( "dba"."judge"."judg_person_id" = :ra_judge_id )
>
> The SELECT statement works fine in the dwo...but when I try
> to do an insert in the dwo from the PowerBuilder window, I
> get:
>
> A database error has occurred.
>
> Database error code: -131
>
> Database error message:
> SQLSTATE=37000 [Sybase][ODBC Driver][SQL Anywhere] Syntax
> error near 'comment' on line 1
>
> No changes made to database.
>
> INSERT INTO
> judge(judg_person_id,last_name,first_name,middle_name
> pers_job_title,comment) VALUES(??????)
>
> I understand that the column "comment" is a reserved word in
> SQLAnywhere 11.0.1, but I have it double quoted above. Also,
> in DB Profile, I have the "Enclose Table and Column Names in
> Quotes" checked with an Identifier Quote Character = '"'.
> Any clue as to what is causing this issue? Any info would be
> greatly appreciated...:)


Mark Posted on 2009-08-28 18:38:08.0Z
Sender: 40e2.4a942e3d.1804289383@sybase.com
From: Mark
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: SQL 11.0.1 issues in PB9.03
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a982410.6491.1681692777@sybase.com>
References: <4a96dfea$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 28 Aug 2009 11:38:08 -0700
X-Trace: forums-1-dub 1251484688 10.22.241.41 (28 Aug 2009 11:38:08 -0700)
X-Original-Trace: 28 Aug 2009 11:38:08 -0700, 10.22.241.41
Lines: 67
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89856
Article PK: 419045

Chris, you were right...my old SQLCA.DBParm said:

DbParm =
"ConnectString='DSN=PeracLawyer_TEST_09',ConnectOption='SQL_DRIVER_CONNECT
,SQL_DRIVER_NOPROMPT'"

My new SQLCA.DBParm says:

DbParm =
"ConnectString='DSN=PeracLawyer_TEST_09',ConnectOption='SQL_DRIVER_CONNECT
,SQL_DRIVER_NOPROMPT',IdentifierQuoteChar='"',DelimitIdentifier='Yes'"

Thanks for you help!!!

> I don't have PB9.0.3 to test but I cannot reproduce this
> behaviour in a more current version of PB. You should not
> need to use the IdentifierQuoteChar unless you plan to
> deviate from the default quote character.
>
> Can you post your connection code for review? Also, I
> would be helpful to see what the value of the transaction
> object DBParm at runtime so that you can verify the
> settings i.e., add a edit box to the application and
> assign it the value of the dbparm as in:
>
> sle_1.text = SQLCA.DBParm
>
>
>
> Mark wrote:
> > Hello all...I have a dwo that has a SQL Select statement
> > with
> > the followings lines:
> >
> > SELECT "dba"."judge"."judg_person_id" ,
> > "dba"."judge"."last_name" ,
> > "dba"."judge"."first_name" ,
> > "dba"."judge"."middle_name" ,
> > "dba"."judge"."pers_job_title",
> > "dba"."judge"."comment"
> > FROM "dba"."judge"
> > WHERE ( "dba"."judge"."judg_person_id" = :ra_judge_id
> > )
> > The SELECT statement works fine in the dwo...but when I
> > try to do an insert in the dwo from the PowerBuilder
> > window, I get:
> >
> > A database error has occurred.
> >
> > Database error code: -131
> >
> > Database error message:
> > SQLSTATE=37000 [Sybase][ODBC Driver][SQL Anywhere]
> > Syntax error near 'comment' on line 1
> >
> > No changes made to database.
> >
> > INSERT INTO
> > judge(judg_person_id,last_name,first_name,middle_name
> > pers_job_title,comment) VALUES(??????)
> >
> > I understand that the column "comment" is a reserved
> > word in SQLAnywhere 11.0.1, but I have it double quoted
> > above. Also, in DB Profile, I have the "Enclose Table
> > and Column Names in Quotes" checked with an Identifier
> > Quote Character = '"'. Any clue as to what is causing
> > this issue? Any info would be greatly appreciated...:)