Returning Parameters from Another Database
Returning Parameters from Another Database
Hi,
I have a stored procedure in another database.
I'm tring to call it as follow:
sp := TSQLStoredProc.Create(nil);
sp.SQLConnection := cnDatabase; (pointing to Database1)
sp.StoredProcName := Database2.dbo.StoredProcedure;
sp.Prepared := True;
sp.ParamByName('ParameterName').Value := 'firefox';
When I call last line (sp.ParamByName('ParameterName').Value := 'firefox') it raises an exception "Parameter 'ParameterName' not found".
I'm using Delphi2010 + devart dbexpsda40.dll (v. 6.0.1.0)
I have a stored procedure in another database.
I'm tring to call it as follow:
sp := TSQLStoredProc.Create(nil);
sp.SQLConnection := cnDatabase; (pointing to Database1)
sp.StoredProcName := Database2.dbo.StoredProcedure;
sp.Prepared := True;
sp.ParamByName('ParameterName').Value := 'firefox';
When I call last line (sp.ParamByName('ParameterName').Value := 'firefox') it raises an exception "Parameter 'ParameterName' not found".
I'm using Delphi2010 + devart dbexpsda40.dll (v. 6.0.1.0)
Re: Returning Parameters from Another Database
Hello,
Thank you for the information. We reproduced the problem and the investigation is in progress. We will notify you when we have any results.
Thank you for the information. We reproduced the problem and the investigation is in progress. We will notify you when we have any results.
Re: Returning Parameters from Another Database
Hi AndreyZ.
Taking a look on other posts, found that on a MySQL post:
"...The point is that our dbExpress driver executes SELECT query to the information_schema table..."
Might this be a clue?
Post link:
http://forums.devart.com/viewtopic.php?t=20316
Taking a look on other posts, found that on a MySQL post:
"...The point is that our dbExpress driver executes SELECT query to the information_schema table..."
Might this be a clue?
Post link:
http://forums.devart.com/viewtopic.php?t=20316
Re: Returning Parameters from Another Database
The problem in the post you referred to has a different cause.
We will fix this problem in the next dbExpress driver for SQL Server build.
We will fix this problem in the next dbExpress driver for SQL Server build.
Re: Returning Parameters from Another Database
Hi AndreyZ.
I'm glad in helping inproving Devart driver.
Waiting for new driver version.
Mauricio
I'm glad in helping inproving Devart driver.
Waiting for new driver version.
Mauricio
Re: Returning Parameters from Another Database
I kindly ask you for a solution to this issue.
I have scheduled a system release early next week and I depend on your fix to move forward.
I cannot postpone my system release anymore. I have been postponed since February'2013.
I am using version 6.1.2.0
I have scheduled a system release early next week and I depend on your fix to move forward.
I cannot postpone my system release anymore. I have been postponed since February'2013.
I am using version 6.1.2.0
Re: Returning Parameters from Another Database
The new dbExpress driver for SQL Server version 6.2.3 is already available. You can download it from Registered Users' Area.
Re: Returning Parameters from Another Database
I have just installed the new SQL Server driver (version 6.2.3.0) and the issue remains.
I got the same error message: “Parameter ‘ParameterName’ not found”.
Regards,
I got the same error message: “Parameter ‘ParameterName’ not found”.
Regards,
Re: Returning Parameters from Another Database
Try executing the following code:Does the message show the correct number of parameters of the stored procedure? If yes, make sure that you are using the correct name of the parameter. If no, please try the following:
- remove dbExpress driver for SQL Server;
- remove all dbexpsda*.dll and DBXDevartSQLServerDriver*.bpl files from your computer;
- remove *.dcu files from your project;
- reinstall dbExpress driver for SQL Server.
Code: Select all
sp.ParamCheck := True;
sp.StoredProcName := 'Database2.dbo.StoredProcedure';
ShowMessage(IntToStr(sp.Params.Count));
- remove dbExpress driver for SQL Server;
- remove all dbexpsda*.dll and DBXDevartSQLServerDriver*.bpl files from your computer;
- remove *.dcu files from your project;
- reinstall dbExpress driver for SQL Server.
Re: Returning Parameters from Another Database
AndreyZ,
I followed your suggestion and all worked fine!
Thank you for your help.
Nanon
I followed your suggestion and all worked fine!
Thank you for your help.
Nanon
Re: Returning Parameters from Another Database
I am glad I could help. If any other questions come up, please contact us.