Board index » delphi » Stored Proc fine in IB, error in MSSQL

Stored Proc fine in IB, error in MSSQL

I have a Stored Proc with IB that selects many records
filtered by a input parameter. Then, I use this to call
this procedure:

Select * From StoredProc1(:Param1) Order By SomeColumn

Then, I would like to transport the same proc to SQL
Server. The SQL code for SQL Server works fine, but I
have to use the following call:

Exec StoredProc1 @Param1

However, this command works only into ISQL_w and DOESN'T
work into TQuery component from Delphi 4. The error msg
arised by Delphi is: Could not find object.

I would like to use the SELECT command in IB and also in
MSSQL, but MSSQL doesn't recognize a select into a Stored
Proc. I MUST use SELECT, because sometimes I have to change
the order by clause of this one into a dinamically created
TQuery. And EXEC command doesn't work like SELECT.

  vcard.vcf
< 1K Download
 

Re:Stored Proc fine in IB, error in MSSQL


Hi,

(Those dumb MS syntax)

Have you tried setting the sqlpassthrough  in BDE? that will execute the
statements in the backend without checking by the BDE

Salim

Quote
Edilmar Lima Alves wrote in message <370E1CE1.E55AE...@vip2000.net>...
>I have a Stored Proc with IB that selects many records
>filtered by a input parameter. Then, I use this to call
>this procedure:

>Select * From StoredProc1(:Param1) Order By SomeColumn

>Then, I would like to transport the same proc to SQL
>Server. The SQL code for SQL Server works fine, but I
>have to use the following call:

>Exec StoredProc1 @Param1

>However, this command works only into ISQL_w and DOESN'T
>work into TQuery component from Delphi 4. The error msg

Other Threads