Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-10-19 : 07:46:01
|
| Oscar writes "I'm testing a small application running against - Sql Server 2005 Express SP1 (Windows XP)- Sql Server 2005 Devloper. (Win 2000)The I/O is done using Borland's BDE over an ODBC connection. The problem is that I can only have one cursor open against any one table. I've tried using NOLOCK, READ_COMMITTED_SNAPSHOT ONEx Cursor a, b; a.Open("select count(*) from A"); . . . b.Open("select x, y, z from A where ...");The second open (b.Open) fails with the message: [Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied on objectand obviously I do have permission since the a.Open() worked.If I do a.Close() before the b.Open the thing works. Would this restriction be the same for using ADO?Thanks in advance for your help." |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-19 : 08:01:18
|
| Why do you need a CURSOR for the first operation, getting a COUNT?Peter LarssonHelsingborg, Sweden |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-10-19 : 13:13:23
|
| He doesn't need it, but the driver is probably creating one for him. I would suggest closing the first cursor, or using another connection library like ADO instead of BDE. |
 |
|
|
|
|
|