Page 1 of 1

Returning Parameters from Another Database

Posted: Wed 13 Feb 2013 18:33
by Nanon
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)

Re: Returning Parameters from Another Database

Posted: Thu 14 Feb 2013 11:11
by AndreyZ
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.

Re: Returning Parameters from Another Database

Posted: Thu 14 Feb 2013 12:33
by Nanon
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

Re: Returning Parameters from Another Database

Posted: Thu 28 Feb 2013 12:14
by Nanon
Anyone?

Re: Returning Parameters from Another Database

Posted: Fri 01 Mar 2013 08:49
by AndreyZ
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.

Re: Returning Parameters from Another Database

Posted: Fri 01 Mar 2013 10:53
by Nanon
Hi AndreyZ.

I'm glad in helping inproving Devart driver.

Waiting for new driver version.

Mauricio

Re: Returning Parameters from Another Database

Posted: Thu 16 May 2013 10:53
by Nanon
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

Re: Returning Parameters from Another Database

Posted: Mon 20 May 2013 05:27
by AndreyZ
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

Posted: Mon 20 May 2013 13:04
by Nanon
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,

Re: Returning Parameters from Another Database

Posted: Tue 21 May 2013 06:26
by AndreyZ
Try executing the following code:

Code: Select all

sp.ParamCheck := True;
sp.StoredProcName := 'Database2.dbo.StoredProcedure';
ShowMessage(IntToStr(sp.Params.Count));
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.

Re: Returning Parameters from Another Database

Posted: Wed 05 Jun 2013 12:26
by Nanon
AndreyZ,
I followed your suggestion and all worked fine!

Thank you for your help.
Nanon

Re: Returning Parameters from Another Database

Posted: Wed 05 Jun 2013 12:58
by AndreyZ
I am glad I could help. If any other questions come up, please contact us.