PB8 and MS SQL 2000: Error...

PB 8.0.3 build 9704
MS SQL 2000 SP2

In script below the insert statement generate this error:
Error 999 (rc -1) :
Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed transaction
mode.

Anyone can help me?
Thanks.

------------------------------------------
Declare c_functions Cursor For
Select   .......

Open c_functions;

Fetch c_functions Into ........;

Do While SQLCA.SqlCode = 0

   Insert Into T_AUTORIZZAZIONI
      (....)
   Values (.....);

    Fetch c_functions Into .......;

Loop
----------------------------------------------




0
Umberto
2/6/2003 9:36:42 AM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

3 Replies
363 Views

Similar Articles

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

For the following type algorithm:

long x_val
Declare Csr Cursor for Select x from table1 where x < 1000 USING SQLCA1 ;
Open csr ;
fetch csr into :x_val ;
do while SQLCA1.SQLCode = 0

    insert table2( new_value) Values( :x_val )  USING SQLCA2 ;

    fetch csr into :x_val ;
loop
Close Csr ;
// Commit changes to table2
Commit USING SQLCA2 ;
// Remove read locks on SQLCA1 connection
Commit USING SQLCA1 ;

For native (OLE_DB) and ODBC connections two separate db connections are
required.
(This was not necessary for the MS 6.5 MSS connection method)

The alternative to two connections is to use either a datastore or array to
fully retrieve the result, and then process the result set one item at a
time.

"Umberto Liguori" <umberto.liguori@soft2000.it> wrote in message
news:Ez7XwWczCHA.198@forums.sybase.com...
> PB 8.0.3 build 9704
> MS SQL 2000 SP2
>
> In script below the insert statement generate this error:
> Error 999 (rc -1) :
> Microsoft OLE DB Provider for SQL Server
> Cannot create new connection because in manual or distributed transaction
> mode.
>
> Anyone can help me?
> Thanks.
>
> ------------------------------------------
> Declare c_functions Cursor For
> Select   .......
>
> Open c_functions;
>
> Fetch c_functions Into ........;
>
> Do While SQLCA.SqlCode = 0
>
>    Insert Into T_AUTORIZZAZIONI
>       (....)
>    Values (.....);
>
>     Fetch c_functions Into .......;
>
> Loop
> ----------------------------------------------
>
>
>
>


0
Tyler
2/6/2003 1:49:33 PM
Thanks very much Tyler for your answer.
Another question..... :-)
Is problem specific to cursor or there are other situation that can generate
this error?

Thanks.


"Tyler Cruse" <Tyler_Cruse@hotmail.com> ha scritto nel messaggio
news:Y7SjBlezCHA.133@forums.sybase.com...
>
> For the following type algorithm:
>
> long x_val
> Declare Csr Cursor for Select x from table1 where x < 1000 USING SQLCA1 ;
> Open csr ;
> fetch csr into :x_val ;
> do while SQLCA1.SQLCode = 0
>
>     insert table2( new_value) Values( :x_val )  USING SQLCA2 ;
>
>     fetch csr into :x_val ;
> loop
> Close Csr ;
> // Commit changes to table2
> Commit USING SQLCA2 ;
> // Remove read locks on SQLCA1 connection
> Commit USING SQLCA1 ;
>
> For native (OLE_DB) and ODBC connections two separate db connections are
> required.
> (This was not necessary for the MS 6.5 MSS connection method)
>
> The alternative to two connections is to use either a datastore or array
to
> fully retrieve the result, and then process the result set one item at a
> time.


0
Umberto
2/6/2003 5:39:30 PM
I think that the rule is that you can have only one result set pending per
connection.  There are a variety of errors that the you can cause by having
two logical result sets on the same connection.

"Umberto Liguori" <umberto.liguori@soft2000.it> wrote in message
news:bPCnikgzCHA.339@forums.sybase.com...
> Thanks very much Tyler for your answer.
> Another question..... :-)
> Is problem specific to cursor or there are other situation that can
generate
> this error?
>
> Thanks.
>
>
> "Tyler Cruse" <Tyler_Cruse@hotmail.com> ha scritto nel messaggio
> news:Y7SjBlezCHA.133@forums.sybase.com...
> >
> > For the following type algorithm:
> >
> > long x_val
> > Declare Csr Cursor for Select x from table1 where x < 1000 USING SQLCA1
;
> > Open csr ;
> > fetch csr into :x_val ;
> > do while SQLCA1.SQLCode = 0
> >
> >     insert table2( new_value) Values( :x_val )  USING SQLCA2 ;
> >
> >     fetch csr into :x_val ;
> > loop
> > Close Csr ;
> > // Commit changes to table2
> > Commit USING SQLCA2 ;
> > // Remove read locks on SQLCA1 connection
> > Commit USING SQLCA1 ;
> >
> > For native (OLE_DB) and ODBC connections two separate db connections are
> > required.
> > (This was not necessary for the MS 6.5 MSS connection method)
> >
> > The alternative to two connections is to use either a datastore or array
> to
> > fully retrieve the result, and then process the result set one item at a
> > time.
>
>


0
Tyler
2/7/2003 5:24:51 AM
Reply:

Similar Artilces:

New errors access MS SQL Server Database on (CREATE DATABASE and Batch SQL Statement)
------=_NextPart_000_002B_01C2F2CB.0C201FF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm running ActiveState perl 5.8.0 on a WIN2K box with MS SQL Server = 2000. Recently I updated DBD-ODBC to v1.05 and DBI to v1.35 Now I get the following errors executing some sql commands CREATE SQLSTMT:[CREATE DATABASE POMS_SER ON (NAME =3D 'POMS_SER_DAT', = FILENAME =3D 'd:\Database\POMS\POMS_SER_Data.MDF', SIZE =3D 10MB) LOG ON = ( NAME =3D 'POMS_SER_LOG', FILENAME =3D = 'd:\Database\POMS\POMS_S...

intermittent Timeout Error with PowerBuilder App and MS SQL Database
We have a client server application that was developed using powerbuilder. This application has several modules, but one of the modules after working fine for several months, has started giving users Timeout Expired errors when creating a new record. Once this starts, every user in that module will start to get this error and we will have to restart the database. The curious thing is that this only occurs in this 1 of 7 modules. There was a thre started last year Oct 25, 2005, where another user was experiencing a similiar situation, but there was no resolution to it. A quesiton w...

Crystal report with ms sql 2000 database connection error
Hi, I am using Crystal report 7 and want to connect with sql server through oledb but "Microsoft OLE DB provider for sql server : Invalid Authosization specification." Error is coming. How can i solve the problem ? Please  help me. ...

local msde SQL database to host MS SQL 2000 database w/o Enterprise manager possible?
I have msde on my computer and i was wondering if was possible to upload my CSK database from it to my hosts MS SQL 200 database. I dont have Enterprise manager or anything like that but i am using VS.NET The simplest way would be to grap a 3rd party tool that can provide enterprise manager like functionality for you. There are several out there ranging from free to cheap. Search google for MSDE managment tools. You might get lucky and find one that does something similar to DTS for transferring objects and data from one server to another. Otherwise, if you have a version of VS.NET that...

Powerbuilder 7 nested SELECT parameter MS SQL Server 2000 error.
Hello. I was reviewing a little bit more my problem and I can redefine it as Powerbuilder 7.0 executing SELECT with a parameter on its WHERE clause, nested within other SELECT and executed against a MS SQL 2000 database, gives an error. i.e.: SELECT DISTINCT field FROM table WHERE data IN ( SELECT data FROM othertable WHERE otherfield= :lsVariable); generates an error where SQLCA.SQLCode= -1 AND SQLCA.SQLErrText='SQL...

How to set database profile to PowerBuilder 10.5 connect to MS-SQL Server 2000 sp4?
Hi: How to set database profile to PowerBuilder 10.5 connect to MS-SQL Server 2000 sp4? It seems that the special connection inferface for "MSS Microsoft SQL Server" is canceled in PowerBuilder 10.5. I do not want to via ODBC. Thanks! Wu; No, MSS driver (actually Microsoft's NTDBLIB.dll) was cancelled by Bill Gates in SQLServer v7. It was supported in 2000 - but ANSI only with limited functionality and dropped for SS2000 and 2005 in the Unicode world. So your choices are: ODBC, OLE-DB and ADO.net. There is new SNC driver for PB 11 that is simil...

MS-SQL 7 to MS-SQL 2000
With Enterprise Manager, how can I convert a database from MS-SQL 7 to MS-SQL 2000 Thanks. Do you have Books Online? There is a topic in there called "Upgrading Databases from SQL Server 7.0 (Copy Database Wizard)" which will tell you how to do it. Terri Terri MortonEngagement Manager, NeudesicHow to ask a question Create a staging database to deal with issues before moving to the destination database. We still have some 7.0 and 2000 running. The process is test a lot then deploy. Hope this helps. Kind regards, Gift PeddieKind regards,Gift Peddie thanks guys...

SQL Server 2005 error when trying to connect to sql server 2000 database
Hi all.I am working on asp.net 2.0 with back end as sqlserver 2000. but when trying to connect to the database i am getting the following error displayed An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Description: An unhandled exception occurred during the execution of the current web request. Please review the...

Pipeline Error using MS SQL Server 7.0
Whe I use the pipeline to copy a table from one MS SQL Server 7.0 database to another, I get the following error: Database error 999 SQLSTATE 07001 [Microsoft] ODBC SQL server Driver] COUNT field incorrect I am connecting to these database with ODBC and NOT any "native" drivers. Powerbuilder 6.51 Microsoft SQL Server 7.0 service pack 1 Any ideas? Thanks, Andy just a guess, but do you have a column in your table named [count] ? SQL Server allows keywords to be used as column/table names as long you provide the {} brackets around it. If you are using ODBC ...

Getting "When connecting to SQL Server 2005 Error" using MS SQL 2000?
I'm new to using VS2005 and this is my first project connecting to our MS SQL 2000. App worked fine on my dev PC, connection to the same MS SQL Server. Published the web site to the web server (same server running MS SQL Server) and getting the below error. Is this a permission setup problem on SQL Server or does it really think it's connecting with a MS SQL 2005 database? An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remot...

PB8 MS SQL-Server 2000
I downloaded PB8 trial and tested it with MS SQL Server 2000. it worked fine. I decided to buy PB8 desktop and I'm unable to connect to my db I've read that only the Enterprise version can connect to it. Is there any patch or any update I can use to make it work? Smarcoux@cbgi.qc.ca You should be able to get an upgrade to Professional, which allows ODBC (and I assume OLEDB connections) to more databases than Desktop allows. On Wed, 3 Jul 2002 13:59:55 -0400, in powersoft.public.powerbuilder.connectivity Stephane <smarcoux@cbgi.qc.ca> wrote: >I downloa...

PB8 + MS SQL-Server 2000
I downloaded PB8 trial and tested it with MS SQL Server 2000. it worked fine. I decided to buy PB8 desktop and I'm unable to connect to my db I've read that only the Enterprise version can connect to it. Is there any patch or any update I can use to make it work? Smarcoux@cbgi.qc.ca You can use PB Professional, but true to its name PowerBuilder Desktop is designed to connect to only the Desktop databases supported by the drivers that ship with the product. On Wed, 3 Jul 2002 14:02:35 -0400, "Stephane" <smarcoux@cbgi.qc.ca> wrote: >I down...

MS SQL Server 6.5 to MS SQL Server 2000
We are migrating from MS SQL Server 6.5 to MS SQL Server 2000. We are using a Native connections and would like to know if there are any issues that we should be aware to do this correctly. TIA Adam Shepherd Are you sure about that? I have not experienced (or heard of) that kind of problem w/ 7.0. There are many other reasons why a table san is performed, but I don't think a numeric data type would cause it... Or are you talking about the PB problem of sending an Integer as 1. -- Kim Berghall Sisu Group, Inc. remove no_spam. no_spam.kberghall@sisugrp.com www.sisugrp...

How to create SQL Mobile 2005 database from a MS SQL 2005 database?
Hi guys,I'm trying to find solutions to help me in creating a SQL Mobile 2005 database from a SQL 2005 database, with the same table structure and data.May I know how can I achieve this?Thanks.Regards,Jenson Hi Jenson, Visual Studio 2005 or SQL Server 2005 is able to open SQL Mobile 2005 database. However you need either SQL or .NET code to convert SQL Mobile 2005 database this way. Here is an example from MSDN forums which is to convert to xls instead: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=78640&SiteID=1Zhao Ji MaSincerely,Microsoft Online Community Suppo...

Web resources about - PB8 and MS SQL 2000: Error... - sybase.powerbuilder.database

Resources last updated: 12/9/2015 6:27:48 PM