Execute Store Procedure that contain select statement

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
overvi
Posts: 8
Joined: Thu 17 Feb 2011 04:00

Execute Store Procedure that contain select statement

Post by overvi » Thu 17 Feb 2011 06:26

I am using UNIDAC latest version on MS SQL Server 2005.
I have a query statement :

CREATE TABLE #customer
( CusId varchar(25),
CusName varchar(50),
CusAddress varchar(100) )
exec S_InsertandSelectCustomer


the store proc S_InsertandSelectCustomer contain insert statement to table #customer and then select it.
If i run the sql stement using UniQuery. and error message
table #customer not found.
What should i do ?
Our old program using BDE can run this with no problem.

AndreyZ

Post by AndreyZ » Thu 17 Feb 2011 13:27

Hello,

I cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com, including a script to create the S_InsertandSelectCustomer stored procedure.

overvi
Posts: 8
Joined: Thu 17 Feb 2011 04:00

Post by overvi » Wed 23 Feb 2011 08:23

I already found it what's wrong with my code. I am using prepare before open the query. This make the table is not recognized.

AndreyZ

Post by AndreyZ » Wed 23 Feb 2011 10:55

It is good to see that this problem was solved. If any other questions come up, please contact us.

overvi
Posts: 8
Joined: Thu 17 Feb 2011 04:00

Post by overvi » Wed 23 Feb 2011 13:30

Hello AndreyZ

Thanks for you help.

Post Reply