Re: Fujitsu cobol and SQLServer
- From: "Steve Rainbird" <steve.nospam.rainbird@xxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Oct 2008 16:14:56 +0100
"Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6ledroFbu0u7U1@xxxxxxxxxxxxxxxxxxxxx
"Steve Rainbird" <steve.nospam.rainbird@xxxxxxxxxxxxxxxxx> wrote in message news:6le8dmFbtr82U1@xxxxxxxxxxxxxxxxxxxxxI have a Fujitsu Cobol program connected to an sql server database via odbc.Server side cursors with SQL Server are not a good idea and are best avoided. As far as I know, there is no way in COBOL you can specify them anyway.
I have one cursor already open, when I try and open another cursor I get the
following error.
[Microsoft][SQL Native Client]Connection is busy with results for another
command
I think from googling that I need to tell the odbc driver to use server side cursors but have
no idea about how to do this.
Any help gratefully received
Regards
--
Steve
Set up two connections to the database and switch between them. (See also: "The solution" under "RDB limitation" thread in this newsgroup.)
EXEC SQL
CONNECT 'DBServer' AS 'conn1' *> assumed userid and password are in your ODBC.inf file
END-EXEC
EXEC SQL
CONNECT 'DBServer' AS 'conn2' *> assumed userid and password are in your ODBC.inf file
END-EXEC
Fujitsu assumes last connection until/unless you use SET CONNECTION.
Declare and open each of your 2 cursors under a separate connection.
You cannot set more than one connection to DEFAULT.
Pete.
--
"I used to write COBOL...now I can do anything."
Pete,
With microfocus cobol I never had this problem (true it is 4 or 5 yesrs since I used Mf and SQL server I tend to use Oracle).
Out of interest why are server side cursors not a good idea?
--
Steve
.
- Follow-Ups:
- Re: Fujitsu cobol and SQLServer
- From: Pete Dashwood
- Re: Fujitsu cobol and SQLServer
- From: Robert
- Re: Fujitsu cobol and SQLServer
- References:
- Fujitsu cobol and SQLServer
- From: Steve Rainbird
- Re: Fujitsu cobol and SQLServer
- From: Pete Dashwood
- Fujitsu cobol and SQLServer
- Prev by Date: Re: Fujitsu cobol and SQLServer
- Next by Date: Re: Fujitsu cobol and SQLServer
- Previous by thread: Re: Fujitsu cobol and SQLServer
- Next by thread: Re: Fujitsu cobol and SQLServer
- Index(es):
Relevant Pages
|