ODBC Issues with SQL Server

From Planimate Knowledge Base
Jump to navigation Jump to search

Useful tips for ODBC and MS SQL Server and stored procedures

  1. 1: When retrieving data from an ODBC database, for certain setups I got the error ‘invalid cursor state’. This occurred sometimes when I used a stored procedure to retrieve data.

Problem Source: The stored procedure returns values, and not records from a table or view in the database, as Planimate expects.

  1. 2: Running a stored procedure gives error "connection is busy with results for another command"
    The solution is to use the following script in the ODBC object in PL:

"set NOCOUNT on;

worked on:
Microsoft SQL Server Management Studio Express 9.00.2047.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 7.0.5730.11
Microsoft .NET Framework 2.0.50727.832
Operating System 5.1.2600

idkbase note 323