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 - 2001-01-02 : 09:28:22
|
Ray writes "When the following code executes: wsprintf( szBuf, "sp_droplogin '%-s'", lpszUserID ); dbcmd( dbproc, szBuf ); SetCursor( LoadCursor( NULL, IDC_WAIT ) ); if( dbsqlexec( dbproc ) == FAIL ) nReturnStatus = -1; else { if (dbresults(dbproc) == SUCCEED) dbcanquery( dbproc ); while( ndbresults!= NO_MORE_RESULTS ) { dbcanquery(dbproc); ndbresults = dbresults(dbproc); } ndbresults never achieves the NO_MORE_RESULTS value but constantly returns SUCCEED. If I execute similar code for any of the related system stored procedures such as sp_addlogin,sp_adduser, sp_dropuser, etc. the results are that the first call to dbresults() after dbcanquery() returns NO_MORE_RESULTS. Can anyone shed some light on this issue? Please note that if I refrain from polling the result status and just wait a few hundred milliseconds before closing the connection, the login gets dropped." |
|
|
|
|
|