PROBLEM with PB 7.0.3 AND SQL SERVER 7.0 USING SQL CURSOR

 I am having a problem running a sql command with a cursor with Native
drivers for MS sql Server 7.0.If i use ODBC or take out the order by clause
in the statement it works fine
By the way I am running powerbuilder 7.0.3 build 10009

The error code is :
(Error 10008 (DB-Library) DB-Library Severity Level 9 Message Text   ad
token from SQL Server: Datastream processing out of synchronization)
here a sample of the code
DECLARE cur_Sec1 CURSOR FOR
   SELECT DISTINCT COL1,COL2
     FROM TABLE1
    WHERE COL1 = ???
 ORDER BY COL1 ASC ;      <<<<<<<<<<<
 OPEN cur_Sec1;

THANKS DANIEL .....


0
Daniel
1/22/2001 1:26:00 PM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

3 Replies
707 Views

Similar Articles

[PageSpeed] 40

I assume that you have either a :FieldName or 'xxx' syntax replacing the ???
in your actual statement.
I use cursors and stored procedures from PB Script in 7.03.10009 without any
problems.  MSS is the most stable and fastest access method as it stands
today for SQL Server.
I have hopes for OLE_DB to be there in the future, but there are numerous
bugs to work around in PB 7 currently.

"Daniel Richard" <danielr@health.nb.ca> wrote in message
news:U4vXAkHhAHA.300@forums.sybase.com...
> I am having a problem running a sql command with a cursor with Native
> drivers for MS sql Server 7.0.If i use ODBC or take out the order by
clause
> in the statement it works fine
> By the way I am running powerbuilder 7.0.3 build 10009
>
> The error code is :
> (Error 10008 (DB-Library) DB-Library Severity Level 9 Message Text   ad
> token from SQL Server: Datastream processing out of synchronization)
> here a sample of the code
> DECLARE cur_Sec1 CURSOR FOR
>    SELECT DISTINCT COL1,COL2
>      FROM TABLE1
>     WHERE COL1 = ???
>  ORDER BY COL1 ASC ;      <<<<<<<<<<<
>  OPEN cur_Sec1;
>
> THANKS DANIEL .....
>
>


0
Tyler
1/22/2001 1:40:46 PM
That correct i have a :FieldName  syntax in the ??? pos  but the problems
comes from the order by clause .If I take this out  my statement work..




"Tyler Cruse" <tcruse@trlx.com> wrote in message
news:KsGkCtHhAHA.296@forums.sybase.com...
> I assume that you have either a :FieldName or 'xxx' syntax replacing the
???
> in your actual statement.
> I use cursors and stored procedures from PB Script in 7.03.10009 without
any
> problems.  MSS is the most stable and fastest access method as it stands
> today for SQL Server.
> I have hopes for OLE_DB to be there in the future, but there are numerous
> bugs to work around in PB 7 currently.
>
> "Daniel Richard" <danielr@health.nb.ca> wrote in message
> news:U4vXAkHhAHA.300@forums.sybase.com...
> > I am having a problem running a sql command with a cursor with Native
> > drivers for MS sql Server 7.0.If i use ODBC or take out the order by
> clause
> > in the statement it works fine
> > By the way I am running powerbuilder 7.0.3 build 10009
> >
> > The error code is :
> > (Error 10008 (DB-Library) DB-Library Severity Level 9 Message Text   ad
> > token from SQL Server: Datastream processing out of synchronization)
> > here a sample of the code
> > DECLARE cur_Sec1 CURSOR FOR
> >    SELECT DISTINCT COL1,COL2
> >      FROM TABLE1
> >     WHERE COL1 = ???
> >  ORDER BY COL1 ASC ;      <<<<<<<<<<<
> >  OPEN cur_Sec1;
> >
> > THANKS DANIEL .....
> >
> >
>
>


0
Daniel
1/22/2001 5:22:37 PM
Here is the sample that works for me:

string select_user_name = "tcruse"
string user_name
long acl


DECLARE cur_Sec1 CURSOR FOR
    SELECT DISTINCT user_name, ACL
      FROM user_list2
     WHERE user_name = :select_user_name
  ORDER BY user_name ASC ;

OPEN cur_Sec1;
f_check( SQLCA, "Open Cursor Failed" )

Fetch cur_Sec1 INTO :user_name, :acl ;
f_check( SQLCA, "First Fetch Failed" )
MessageBox( user_name, string( acl ))

Close Cur_Sec1 ;



"Daniel Richard" <danielr@health.nb.ca> wrote in message
news:r8nqOoJhAHA.296@forums.sybase.com...
> That correct i have a :FieldName  syntax in the ??? pos  but the problems
> comes from the order by clause .If I take this out  my statement work..
>
>
>
>
> "Tyler Cruse" <tcruse@trlx.com> wrote in message
> news:KsGkCtHhAHA.296@forums.sybase.com...
> > I assume that you have either a :FieldName or 'xxx' syntax replacing the
> ???
> > in your actual statement.
> > I use cursors and stored procedures from PB Script in 7.03.10009 without
> any
> > problems.  MSS is the most stable and fastest access method as it stands
> > today for SQL Server.
> > I have hopes for OLE_DB to be there in the future, but there are
numerous
> > bugs to work around in PB 7 currently.
> >
> > "Daniel Richard" <danielr@health.nb.ca> wrote in message
> > news:U4vXAkHhAHA.300@forums.sybase.com...
> > > I am having a problem running a sql command with a cursor with Native
> > > drivers for MS sql Server 7.0.If i use ODBC or take out the order by
> > clause
> > > in the statement it works fine
> > > By the way I am running powerbuilder 7.0.3 build 10009
> > >
> > > The error code is :
> > > (Error 10008 (DB-Library) DB-Library Severity Level 9 Message Text
ad
> > > token from SQL Server: Datastream processing out of synchronization)
> > > here a sample of the code
> > > DECLARE cur_Sec1 CURSOR FOR
> > >    SELECT DISTINCT COL1,COL2
> > >      FROM TABLE1
> > >     WHERE COL1 = ???
> > >  ORDER BY COL1 ASC ;      <<<<<<<<<<<
> > >  OPEN cur_Sec1;
> > >
> > > THANKS DANIEL .....
> > >
> > >
> >
> >
>
>


0
Tyler
1/22/2001 11:49:27 PM
Reply:

Similar Artilces:

Connection of PB 6.0 to SQL Server 7.0 & Version B/W PB 6.0 and PB 7.0
Can anyone tell me about connecting PB 6.0 to SQL Server 7.0. Please remember we are not planning to upgrade both software. When I was trying to connect PB 6.0 to SQL Server 7.0, error occurred " SQLSTAT 1003". OS=NT 4.0 Server PB=6.0 Enterprise Edition SQL SERVER=7.0 Corporate Edition I also want to know the versions between PB 6.0 to PB 7.0 If your are using the ODBC, which I assume you are, include Disablebind=1 in your DBParm. If your deployment environment is also NT, you will have to turn SQLSPY=1 using PFC services. Autocommit=FALSE and SetTransObject() ra...

Help me about connecting PB 6.0 to SQL Server 7.0 & Versions B/W PB 6.0 and PB 7.0
Can anyone tell me about connecting PB 6.0 to SQL Server 7.0. Please remember we are not planning to upgrade both software. When I was trying to connect PB 6.0 to SQL Server 7.0, error occurred " SQLSTAT 1003". OS=NT 4.0 Server PB=6.0 Enterprise Edition SQL SERVER=7.0 Corporate Edition I also want to know the versions between PB 6.0 to PB 7.0 I don't believe this is going to be possible without at least upgrading to the latest maintenance release of 6.x. On Mon, 23 Aug 1999 00:59:56 -0700, in powersoft.public.powerbuilder.database Abdul Lateef <abdul_lat...

PB 7.0 and MS-SQL Server 7.0 login problem
I am having a problem connecting my app to the MS SQL-Server database. I'm sure it's something obvious that I'm missing. From my computer, it connects just finewith no login box. When I try to connect from a different computer, a login window pops up with "Admin" as the log in name. The database should be using a trusted connection from a computer within the domain. The user on the computer is successfully logged into the (NT 4) domain. Any ideas what I am failing to do? Hi, You must provide a valid login id on the other PC you specified and this login must ...

Problem with PB 7.0 And MS SQL Server 7.0 ODBC
I am having some problem using PowerBuilder 7.0 with MS SQL Server 7.0 and ODBC. Arguments to datawindows and nested SQL doesn't seem the work properly. The following is some lines from the ODBC trace-file: SELECT report.reportkey, report.reporttype, report.reportname FROM report WHERE exists (SELECT reportparam.reportkey FROM reportparam WHERE ( reportparam.reportkey = report.reportkey ) AND reportparam.paramtype = ? )) ORDER BY report.reportname VCHAR Length=4 ID=:as_paramtype *test* (10 MilliSeconds) Error 999 (rc -1) : SQLSTATE ...

PB 7.0 Client Cursor and MS SQL Server 7.0
We are in the process of migrating from MS SQL 6.5 to MS SQL 7.0 and are running with PB 7.0 build 5031. Our PB application uses a cursor which works fine with MS SQL 6.5 but we are getting the following error with MS SQL 7.0 when we open the cursor: SQLCODE = -1 SQLDBCODE = 999 SQLERRTEXT= "34000[Microsoft][ODBC SQL Server Driver] Invalid cursor name" Is there a different database connection setting, different way to set up transaction object, different setting on ODBC connection, or something else that we should be doing or looking at when we go...

pb 7.0.3 build 10089 and sql server 7.0 : Slow Connection
We've got the same problem as earlier mentioned by Ken Freeman (see message below), but we're using pb version 7.0.3 Build 10089 and sql server 7.0?!!? Can anyone help us? "Ken Freeman" <kfreeman@ems.jsc.nasa.gov> wrote in message news:p1fXadCIBHA.201@forums.sybase.com... > We've recently upgraded from PB 6.5 to PB 7.0.2 (Build 8003). > Before the upgrade, a connection in development mode took a few seconds. > Now it takes several minutes. > > Does anyone know what might be cause the slowdown? > > Thanks, > Ken > > ...

PowerBuilder 5.0.3 strange problem with SQL Server 7.0
Hi, I am doing a simple select statment in a PB script, it works fine if I am connected to a SQL Anywhere DB with odbc, but the same code will not work if I am connected to MS SQL Server! The code is something like: int li_total Select count(*) from sfref into :li_total; I will not get an SQL error BUT li_total will not be updated!! Howerver the same code will work fine with SQL Anywere! Any help would be great!! Don't know why it works at all, it's not standard syntax. Maybe something that works in SQL Anywhere. Anyway, it should be: Select count(*...

PowerBuilder 5.0.3 strange problem with SQL Server 7.0
Hi, I am doing a simple select statment in a PB script, it works fine if I am connected to a SQL Anywhere DB with odbc, but the same code will not work if I am connected to MS SQL Server! The code is something like: int li_total Select count(*) from sfref into :li_total; I will not get an SQL error BUT li_total will not be updated!! Howerver the same code will work fine with SQL Anywere! Any help would be great!! Don't know why it works at all, it's not standard syntax. Maybe something that works in SQL Anywhere. Anyway, it should be: Select count(*...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

Can't execute Stored Procedures with argument(s) using MS SQL 7.0 versus PB 7.0.3
I am using Power Builder 7 and I have installed the patch up to version 7.0.3 I connect to my SQL database (MSSQL 7) using regular ODBC for SQL Server. It works fine for retrieving any kind of sql syntax that I create using datawindow. However, it doesn't work for running a stored procedure with argument(s). The stored procedure itself runs just fine when I tested it from MSSQL's Query Analyzer. Examples: alter procedure dba.sp_people_long_name --> this one works just fine, because it has NO arguments as begin select peopleid,longname=lastname+', '...

Problem regarding the connection of PB 7.0 with SQL 7.0
I'm calling some stored procedures written in SQL Server 7.0 from the Power Builder 7.0 through the SQL Server native driver connection. It doesn't return back whenever I execute it from the Frontend while it works perfectly when I execute that stored procedure from Query Analyser directly. It has been working fine when I did the same operetion using PB 6.5 & SQL 6.5. Plz help me in this regard as soon as possible. Regards, Guls try to trap SQLCA.SQLCode, SQLCA.SQLDBCode and SQLCA.SQLErrText and include them in the post - this will allow localize the problem better...

PB 6.5/7.0 to SQL Server 7.0
Hi everybody, I hope someboby can help me. 1. What do i have to do to connect SQL Server 7.0 using PB6.5 with native=20 drivers? 2. I have so many problems using PB7.0 and SQL Server 7.0, in fact i can=B4= t=20 use it due to: - The connection through native drivers is too slow, and almost impossible = using more than one transcction object. - It's very often to get Dr. Watson messages that close everything, so that= =20 i can't develop. Thanks in advanced. Ulises Gomez RCI Mexico ulises.gomez@latam.rci.com 1. Upgrade to 6.5.1 2. Which version/build of PB7?...

PB 7.0.2 and MS SQL Server 7.0
Hello everyone, I am running PB 7.0.2 (Build 8046) and I am trying to connect to MS SQL Server 7.0 database. I can connect to the database via ODBC with no problems, but when I attempt to use the MS SQL Client Software 7.0, I get an error "Could not connect to database." Is SQL Client Software v7.0 even supported with PB 7x or do I have to go to 6.0 of SQL Client? -- Thanks, Daryl L. Avery Development Technologies Consultant Software Spectrum, Inc. E-mail: Daryl.Avery@SoftwareSpectrum.com Website: SoftwareSpectrum.com Voice: (972) 864-5114 Fax: (972) 864-3292 ...

Web resources about - PROBLEM with PB 7.0.3 AND SQL SERVER 7.0 USING SQL CURSOR - sybase.powerbuilder.general

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

"The Yale Problem"
... nice woman who was trying to help them, and reducing her to tears. As we’ve seen more and more of this, I’ve begun calling it, “the Yale problem,” ...

January 2016: New Year, Old Problems Edition
... Drop in Nissan Leaf, Toyota Prius demand more than offset gains from Tesla, Chevy Volt Continue reading January 2016: New Year, Old Problems ...

3 of the world’s most popular Apple bloggers all say Apple has a serious problem
... above the rest. According the three of the most popular and widely respected Apple bloggers in the world, however, Apple has a serious problem ...

3 of Apple's closest watchers say the company has a growing problem
... closest watchers, blogger John Gruber, columnist Walt Mossberg, and blogger Jim Dalrymple, all agree that the company has a growing problem ...

Air bag problem: Automakers to recall 5M vehicles
Continental Automotive Systems says moisture can get inside its air bag control computers, causing power supplies to corrode and fail

The Grinder Is Having Some Problems, Here's What We Know
Fox is a network that is often known for comedy, and this year the little network that could has released a few brand new comedies in order to ...

Japan's two China problems
"The current situation of the Chinese economy is not good for anybody," a top Japanese diplomat told CNBC.

Continental recalls 5 million vehicles for a different kind of airbag problem
This recall, which is completely separate from Takata's recall, involves a faulty control unit.

Sanders: I Have ‘A Real Problem’ With Clinton Speaking Fees
'Money in politics is something the American people are deeply concerned about'

Resources last updated: 2/5/2016 9:31:39 AM