Board index » delphi » Can't execute Stored Proc (D4,SQL 6.5 sp5a )
John C. Noland
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
John C. Noland
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Can't execute Stored Proc (D4,SQL 6.5 sp5a )
I believe this problem first occured after installing SP5a for MS SQL
Server 6.5 One of my apps calls a stored procedure using a TQuery. The app Message: Operation not applicable. I created dummy app that just queries using the stored proc and I get Any ideas would be appreciated. John |
Tomislav Kard
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )On Fri, 07 May 1999 15:08:44 -0700, "John C. Noland" <jnol...@remove.firstam.com> wrote: Quote>I believe this problem first occured after installing SP5a for MS SQL Quote>Any ideas would be appreciated. tomi |
John C. Nolan
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )Yes, the app has been working for months before I updated to SP5a (which is not the same as SP5). The procedure that creates the query and executes the MSSQL stored procedure follows: procedure TfrmSecurity.GetRightsList(dbName, userName, password: string; UserRights: aQry := TQuery.Create(nil); Quote"Tomislav Karda?" wrote: |
Tomislav Kard
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )Hi John! Well can't say anything from your code, but I suggest you to find the So, first find out what instruction is making trouble and than we can So far I'am not of much help, anyway please write if you consider I tomi. |
John C. Nolan
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )The line that causes the problem is "OPEN" and the same code works in ISQL. It also works if I don't use a stored procedure and put the query in a TQuery. The procedure that creates the query and executes the MSSQL stored procedure TfrmSecurity.GetRightsList(dbName, userName, password: aQry := TQuery.Create(nil); Quote"Tomislav Karda?" wrote: |
Tomislav Kard
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )Hi John! I have some ideas what may be wrong. On Tue, 11 May 1999 11:43:10 -0700, "John C. Noland" Quote<jnol...@remove.firstam.com> wrote: specify the type for parameters because TQuery can not know that from scratch. I guess that when you assign params with As prefix that then their type is automaticaly determined but I am not sure. In this case here I would add four more lines: Quote> Prepare; use it at all - because if you Prepare manualy like you did than you have to UnPrepare also. Otherwise Open will prepare/unprepare automaticaly for you. It is obvious that you do not get it right when to use Prepare, there was some discussion on this in this news group. - Hide quoted text - - Show quoted text - Quote> ParamByName('user').AsString := userName; tomi. |
John C. Nolan
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )That did not help. However, I have narrowed to the problem down to passing parameters! If I do SQL.Add('usp_Security_Rights "userid", "password"); it works fine. If I do SQL.Add('usp_security_rights :user, :password '); and then set the parm values, I get not a valid operation error. Obviously, I have a development network with an NT Server and a few Win95 clients. When Now, my NT Server is connected to the internet via a cable modem. If I use Its after I updated my NT server with SP3 and my SQL Server with SP5a that I Quote"Tomislav Karda?" wrote: |
Tomislav Kard
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Can't execute Stored Proc (D4,SQL 6.5 sp5a )Sorry John, i can not help you on this one :-( |
1. SQL 6.5 MDAC 2.5 Stored Proc problem
2. MS SQL 6.5 Stored Proc with Text (Memo) Param
3. Getting Output Parameters from SQL Server 6.5 Stored Proc
4. D4/sql 6.5 to D5/sql 6.5 creates Tstoredproc error
5. TStoredProc problem in d4: 'Capability not supported' when calling stored proc on MS-SQL 6.5
6. I can't execute a stored proc in oracle 8.1.7
7. MS-SQL Stored Proc not Executing
8. Can't exec Stored Procedures after SP5a