PowerSoft ODBC interface

I used Client Access ODBC Driver (32-bit).
PowerBuilder 5.0.3 and 6.0.

I executed following script:

///////////////////////////////////////////////////
String ls_SQL
DynamicStagingArea l_dsa
DynamicDescriptionArea l_dda

ls_SQL = "CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD')"

l_dsa = SQLSA
l_dda = SQLDA

DECLARE l_proc DYNAMIC PROCEDURE FOR l_dsa;
PREPARE l_dsa FROM :ls_SQL;
DESCRIBE l_dsa INTO l_dda;
EXECUTE DYNAMIC l_proc USING DESCRIPTOR l_dda;
///////////////////////////////////////////////////

I got following error:

[     125] "[IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 -
Keyword WHERE not expected. Valid tokens: <END-OF-STATEMENT>."



I tryed to find out where is my mistake.
I used ODBC Trace utility.

ODBC Trace Log showed that PowerBuilder's PowerSoft ODBC interface sends
incorrect statement in ODBC's function SQLExecDirect.It sends that statement
"CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF
no_current_cursor\ 0"
inspite of my "CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD')".

I think that is the main reason of the problem.

Can somebody explain me why after my statement attached this text
" WHERE CURRENT OF no_current_cursor\ 0" ?????
I need explanation from developers of PowerBuilder's PowerSoft ODBC
interface.

The slice of the ODBC Trace Log:
---
PB050           ea:d2   ENTER SQLAllocStmt
                HDBC                0x0032f8f0
                HSTMT *             0x0012df84

PB050           ea:d2   EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
                HDBC                0x0032f8f0
                HSTMT *             0x0012df84 ( 0x027cc350)

PB050           ea:d2   ENTER SQLExecDirect
                HSTMT               0x027cc350
                UCHAR *             0x0177c948 [      -3] "CALL
PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF no_current_cursor\
0"
                SDWORD                    -3

PB050           ea:d2   EXIT  SQLExecDirect  with return code -1 (SQL_ERROR)
                HSTMT               0x027cc350
                UCHAR *             0x0177c948 [      -3] "CALL
PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF no_current_cursor\
0"
                SDWORD                    -3

                DIAG [37000] [IBM][Client Access ODBC Driver
(32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not expected. Valid tokens:
<END-OF-STATEMENT>. (-199)

                DIAG [37000] [IBM][Client Access ODBC Driver
(32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not expected. Valid tokens:
<END-OF-STATEMENT>. (-199)

PB050           ea:d2   ENTER SQLError
                HENV                0x00000000
                HDBC                0x0032f8f0
                HSTMT               0x027cc350
                UCHAR *             0x0177c8ac (NYI)
                SDWORD *            0x0012df84
                UCHAR *             0x0177caf4
                SWORD                      513
                SWORD *             0x0012df7a

PB050           ea:d2   ENTER SQLErrorW
                HENV                0x00000000
                HDBC                0x0032f8f0
                HSTMT               0x027cc350
                WCHAR *             0x0012df30 (NYI)
                SDWORD *            0x0012df84
                WCHAR *             0x0012db30
                SWORD                      512
                SWORD *             0x0012df7a

PB050           ea:d2   EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
                HENV                0x00000000
                HDBC                0x0032f8f0
                HSTMT               0x027cc350
                WCHAR *             0x0012df30 (NYI)
                SDWORD *            0x0012df84 (-199)
                WCHAR *             0x0012db30 [     125] "[IBM][Client
Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 "
                SWORD                      512
                SWORD *             0x0012df7a (125)

PB050           ea:d2   EXIT  SQLError  with return code 0 (SQL_SUCCESS)
                HENV                0x00000000
                HDBC                0x0032f8f0
                HSTMT               0x027cc350
                UCHAR *             0x0177c8ac (NYI)
                SDWORD *            0x0012df84 (-199)
                UCHAR *             0x0177caf4 [     125] "[IBM][Client
Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not
expected. Valid tokens: <END-OF-STATEMENT>."
                SWORD                      513
                SWORD *             0x0012df7a (125)

PB050           ea:d2   ENTER SQLCancel
                HSTMT               0x027cc350

PB050           ea:d2   EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
                HSTMT               0x027cc350

PB050           ea:d2   ENTER SQLFreeStmt
                HSTMT               0x027cc350
                UWORD                        1 <SQL_DROP>

PB050           ea:d2   EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
                HSTMT               0x027cc350
                UWORD                        1 <SQL_DROP>


--

Andrey Leskovoy
http://www.fuib.com/

0
Andrey
8/8/1998 9:01:11 AM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

1 Replies
825 Views

Similar Articles

[PageSpeed] 2
Get it on Google Play
Get it on Apple App Store

PowerBuilder thinks you are using a dynamic CURSOR rather than a dynamic
PROCEDURE and it bases that on the string that you are preparing.  Try changing
ls_SQL to 'EXECUTE PSAVDEPTOR(...)' rather than 'CALL PSAVDEPTOR(..)'

Jim O'Neil
Sybase Technical Support
joneil@sybase.com

Andrey Leskovoy wrote:

> I used Client Access ODBC Driver (32-bit).
> PowerBuilder 5.0.3 and 6.0.
>
> I executed following script:
>
> ///////////////////////////////////////////////////
> String ls_SQL
> DynamicStagingArea l_dsa
> DynamicDescriptionArea l_dda
>
> ls_SQL = "CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD')"
>
> l_dsa = SQLSA
> l_dda = SQLDA
>
> DECLARE l_proc DYNAMIC PROCEDURE FOR l_dsa;
> PREPARE l_dsa FROM :ls_SQL;
> DESCRIBE l_dsa INTO l_dda;
> EXECUTE DYNAMIC l_proc USING DESCRIPTOR l_dda;
> ///////////////////////////////////////////////////
>
> I got following error:
>
> [     125] "[IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 -
> Keyword WHERE not expected. Valid tokens: <END-OF-STATEMENT>."
>
> I tryed to find out where is my mistake.
> I used ODBC Trace utility.
>
> ODBC Trace Log showed that PowerBuilder's PowerSoft ODBC interface sends
> incorrect statement in ODBC's function SQLExecDirect.It sends that statement
> "CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF
> no_current_cursor\ 0"
> inspite of my "CALL PSAVDEPTOR(2, 129, '', '', 'DATA FIELD')".
>
> I think that is the main reason of the problem.
>
> Can somebody explain me why after my statement attached this text
> " WHERE CURRENT OF no_current_cursor\ 0" ?????
> I need explanation from developers of PowerBuilder's PowerSoft ODBC
> interface.
>
> The slice of the ODBC Trace Log:
> ---
> PB050           ea:d2   ENTER SQLAllocStmt
>                 HDBC                0x0032f8f0
>                 HSTMT *             0x0012df84
>
> PB050           ea:d2   EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
>                 HDBC                0x0032f8f0
>                 HSTMT *             0x0012df84 ( 0x027cc350)
>
> PB050           ea:d2   ENTER SQLExecDirect
>                 HSTMT               0x027cc350
>                 UCHAR *             0x0177c948 [      -3] "CALL
> PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF no_current_cursor\
> 0"
>                 SDWORD                    -3
>
> PB050           ea:d2   EXIT  SQLExecDirect  with return code -1 (SQL_ERROR)
>                 HSTMT               0x027cc350
>                 UCHAR *             0x0177c948 [      -3] "CALL
> PSAVDEPTOR(2, 129, '', '', 'DATA FIELD') WHERE CURRENT OF no_current_cursor\
> 0"
>                 SDWORD                    -3
>
>                 DIAG [37000] [IBM][Client Access ODBC Driver
> (32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not expected. Valid tokens:
> <END-OF-STATEMENT>. (-199)
>
>                 DIAG [37000] [IBM][Client Access ODBC Driver
> (32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not expected. Valid tokens:
> <END-OF-STATEMENT>. (-199)
>
> PB050           ea:d2   ENTER SQLError
>                 HENV                0x00000000
>                 HDBC                0x0032f8f0
>                 HSTMT               0x027cc350
>                 UCHAR *             0x0177c8ac (NYI)
>                 SDWORD *            0x0012df84
>                 UCHAR *             0x0177caf4
>                 SWORD                      513
>                 SWORD *             0x0012df7a
>
> PB050           ea:d2   ENTER SQLErrorW
>                 HENV                0x00000000
>                 HDBC                0x0032f8f0
>                 HSTMT               0x027cc350
>                 WCHAR *             0x0012df30 (NYI)
>                 SDWORD *            0x0012df84
>                 WCHAR *             0x0012db30
>                 SWORD                      512
>                 SWORD *             0x0012df7a
>
> PB050           ea:d2   EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
>                 HENV                0x00000000
>                 HDBC                0x0032f8f0
>                 HSTMT               0x027cc350
>                 WCHAR *             0x0012df30 (NYI)
>                 SDWORD *            0x0012df84 (-199)
>                 WCHAR *             0x0012db30 [     125] "[IBM][Client
> Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 "
>                 SWORD                      512
>                 SWORD *             0x0012df7a (125)
>
> PB050           ea:d2   EXIT  SQLError  with return code 0 (SQL_SUCCESS)
>                 HENV                0x00000000
>                 HDBC                0x0032f8f0
>                 HSTMT               0x027cc350
>                 UCHAR *             0x0177c8ac (NYI)
>                 SDWORD *            0x0012df84 (-199)
>                 UCHAR *             0x0177caf4 [     125] "[IBM][Client
> Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0199 - Keyword WHERE not
> expected. Valid tokens: <END-OF-STATEMENT>."
>                 SWORD                      513
>                 SWORD *             0x0012df7a (125)
>
> PB050           ea:d2   ENTER SQLCancel
>                 HSTMT               0x027cc350
>
> PB050           ea:d2   EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
>                 HSTMT               0x027cc350
>
> PB050           ea:d2   ENTER SQLFreeStmt
>                 HSTMT               0x027cc350
>                 UWORD                        1 <SQL_DROP>
>
> PB050           ea:d2   EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
>                 HSTMT               0x027cc350
>                 UWORD                        1 <SQL_DROP>
>
> --
>
> Andrey Leskovoy
> http://www.fuib.com/



0
Jim
8/17/1998 12:37:32 PM
Reply:

Similar Artilces:

powersoft.public.powerbuilder.general
Can someone help me please. I am using PB7 Build 8033 and Excel 97 SR1 I have a spreadsheet which has 1 chart "graph", and 2 sheets "Model" and "Calculations". There are also 7 macros in module 1. I am trying to use OLE Automation to link to the spreadsheet, I need to populate some cells, run some macros and retreive some cells. I can get excel and the spreadsheet to open in automation mode, I can retreive and populate individual cell value, and I can successfully close and disconnect from excel and the spreadsheet. My problem is that I cannot s...

powersoft.public.powerbuilder.general
This news group seems to be down, trying to hit it from the web page. I was able to hit it 11:25 am Eastern Daylight Savings Time vie OE newsreader. Russ <rob.potts@veridian.com> wrote in message news:3485451A5E94D5550053492985256D08.0053493885256D08@webforums... This news group seems to be down, trying to hit it from the web page. I've notified the people in charge. Until it's resolve, you can still use the web-based newsreader at www.pfcguide.com. On Mon, 14 Apr 2003 12:14:52 -0400, in powersoft.public.powerbuilder.futures_discussion <Joe_Slawsky> ...

[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Invalid date, time or timestamp value. error
Hi everyone, have a problem with this line of code:  thisquery = "select type as tender from dlpaid where stor = '"&istor&"' and tran = '"&itran&"' and till = '"&itill&"' and date1 = '"&right(idate, 4)&"-"&right(left(idate, 5), 2)&"-"&left(idate, 2)&"'  "set ConnRsOrig =oconnPV.execute(thisquery) This error occurs sometimes but not all the time: Refund Checking fault occurredMicrosoft OLE DB Provider for ODBC Drivers error '800...

Powerbuilder ODBC
Hello: I have a Powerbuilder database (extension file .db) and I want to open with SqlAnywhere ODBC, but I can't. (I don't know) Can you tell me how to do it please? thank you very much You have a SQLAnywhere database. PowerBuilder is a development tool that happens to include SQL Anywhere - PowerBuilder has no "database" of its own. What version of SQL Anywhere do you have? Paul Horan[TeamSybase] "Anne" <anmalo42@lycos.es> wrote in message news:46876fc4@forums-1-dub... > Hello: > I have a Powerbuilder database (extension file ....

What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...

Interface In Powerbuilder
Dear All, I would like to apply OO design pattern concept into PB my application. However, I found there are no interface feature in PB/PowerScript. (For term "interface", I mean that user should use implements key word in java. e.g. public class Lion implements Predator ) Any way to implement interface in PB? Any reference material available? (I cannot find in PB manual) Thank You! Antony Roland M�hlberger is the autor of two essays published in PBDJ back in the days of PowerBuilder 8 or 9 (i am not sure about the version) you can find Part 1 in volume...

ODBC Connections with PowerBuilder
This is actually a follow up to my previous "PB5.0 Connection to Watcom DB." We upgraded the PB libraries to 5.0.04 and were able to solve the "The allocation of the connection handle failed" problem. However, the "The command extension block could not be allocated" still happens when: 1) Start a PB application with an ODBC connection and leave it running. 2) Start and end a second PB application with an ODBC connection. 3) Repeat step 2 24 times. 4) When the second app is started the 25th time we get the "The command extension block could not ...

installing powersoft interfaces
i need to install a new interface for oracle 8.04 how do i do that? jeff Make sure you download IM 6.51 first, available at http://download.sybase.com/esd/pb.html It should include the O84 driver, pbo8460.dll Modify the Vendors line in the [Database] section in the im.ini file: Vendors=ODBC,O72 Oracle 7.2,O73 Oracle 7.3, O84 Oracle8.04 and up You must have Net804 or later installed. Make sure that the oraxxx\bin directory is in your path. You now should be able define O84 connections. Be aware that you specify the server without the @, as you do with the O73 driver. Also...

General Powersoft information
I need some information on Powerbuilder in general such as: 1. When did the product and its subsequent versions come out PB1.0. 2. When did watcom come in. 3. Who's who in powersoft/sybase.(Background to startup) etc. TIA Glenn. ...

ODBC interface question
I have a complete Powerbuilder 7.0 Enterprise installed but I am not showing that I have an ODBC installed database interface in the database painter. I need to connect an ODBC datasource. Can anyone help? Thanks so much! Add ODB to the vendors line in your pb.ini file. i.e, Vendors=ODB,... /ck <JC> wrote in message news:3765165F7E09D2E0000246C385256ABF.000246D385256ABF@webforums... > I have a complete Powerbuilder 7.0 Enterprise installed but I am not > showing that I have an ODBC installed database interface in the database > painter. I need to connect a...

Interfacing Powerbuilder with Alchemy
Alchemy is a Report Archiving and Retrieval System that accepts reports from a client system and archives them. We would like to interface Powerbuilder 6.5 with Alchemy. Our problem is that Alchemy only accepts ASCII data. We are in the habit of saving our reports as PSR files which Alchemy can obviously not recognise. We prefer the PSR format because it preserves all the data as well as all datawindow formatting and graphics (bitmaps, etc). No other SaveAs() format does this to our knowledge. Has anybody out there used Alchemy with Powerbuilder? If yes, how? The broader more ...

Web resources about - PowerSoft ODBC interface - sybase.powerbuilder.general

Powersoft K Series at the Core of the 'Desert Underground' as Moontribe Collective Celebrates its 22nd ...
August 13, 2015 · Camarillo, Calif. – Before the dawn of the mainstream, there was the desert underground. The highly passionate, non-commercial ...

Powersoft K Series at the Core of the 'Desert Underground' as Moontribe Collective Celebrates its 22nd ...
Whump Sound Brings High Quality, Reliable Audio to Full Moon Desert Gatherings, Where Love for Electronic Music and Desert Atmosphere Prevails ...

Hummingbird Media (@HummingbirdBuzz) on Twitter
... Explorer. Learn more here Hummingbird Media @ HummingbirdBuzz New York, USA Public Relations for Sennheiser, Moog, BAE Audio, Neumann, Powersoft, ...

Larry Ellison - Wikipedia, the free encyclopedia
Lawrence Joseph "Larry" Ellison (born August 17, 1944 in The Bronx , New York City , New York ) is the co-founder and chief executive officer ...

Lift Vertige, root-uplifting gel - couture styling Kérastase
Lift Vertige elevates roots with subtlety, for a guaranteed “higher hair” effect, delicate softness, shine.

Future High Street Summit Leicester
An up to date list of all the networking events for the computer and IT community

Atari Legend - Legends never die!
Atari Legend : The number 1 Atari ST resource on the web

Feature: The 'complicated algorithm' of great festival sound
The festival circuit remains a vital revenue generator for audio firms, but is hardly free of challenges, as David Davies discovers.

Void powers Chase and Status' Welsh warehouse gig
Arcline system for Cardiff EDM event provided by Spartan Audio.

Defunct Audio Manufacturers - Al - audiotools.com.
Information on defunct audio equipment manufacturers with names starting with Al

Resources last updated: 12/17/2015 3:12:56 AM