Problem using SQLExecute when calling stored procedure
From: Prakash (anonymous_at_discussions.microsoft.com)
Date: 05/21/04
- Next message: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Previous message: Rob Fcasni: "Bad display on Data source (ODBCAD32.exe)"
- Next in thread: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Reply: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 May 2004 09:21:06 -0700
Hi!
I am having problem using SQLExecute for calling stored procedures in a loop (for SQL server). Following is how I coded:
sqlReturn = SQLAllocHandle(SQL_HANDLE_STMT, ....);
sqlReturn = SQLPrepare(sqlStatement,....);
sqlReturn = SQLBindParameter(sqlStatement,....);
sqlReturn = SQLBindParameter(sqlStatement,....);
for (lIndex = 0; lIndex < 100; lIndex++)
{
GetData(...);
sqlReturn = SQLExecute(sqlStatement,....);
}
The loop executed fine once, but fails the second time. The sql return code is -1, and diag record returns Invalid cursor state...The above works fine for Oracle database, but returns error for SQL server.
Any help is highly appreciated....
Thank you.
- Next message: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Previous message: Rob Fcasni: "Bad display on Data source (ODBCAD32.exe)"
- Next in thread: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Reply: AmazingWolf: "Re: Problem using SQLExecute when calling stored procedure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|