Returning Parameters from Another Database

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Returning Parameters from Another Database

Post by Nanon » Wed 13 Feb 2013 18:33

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)

AndreyZ

Re: Returning Parameters from Another Database

Post by AndreyZ » Thu 14 Feb 2013 11:11

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.

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Thu 14 Feb 2013 12:33

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

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Thu 28 Feb 2013 12:14

Anyone?

AndreyZ

Re: Returning Parameters from Another Database

Post by AndreyZ » Fri 01 Mar 2013 08:49

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.

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Fri 01 Mar 2013 10:53

Hi AndreyZ.

I'm glad in helping inproving Devart driver.

Waiting for new driver version.

Mauricio

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Thu 16 May 2013 10:53

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

AndreyZ

Re: Returning Parameters from Another Database

Post by AndreyZ » Mon 20 May 2013 05:27

The new dbExpress driver for SQL Server version 6.2.3 is already available. You can download it from Registered Users' Area.

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Mon 20 May 2013 13:04

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,

AndreyZ

Re: Returning Parameters from Another Database

Post by AndreyZ » Tue 21 May 2013 06:26

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.

Nanon
Posts: 7
Joined: Wed 13 Feb 2013 18:21

Re: Returning Parameters from Another Database

Post by Nanon » Wed 05 Jun 2013 12:26

AndreyZ,
I followed your suggestion and all worked fine!

Thank you for your help.
Nanon

AndreyZ

Re: Returning Parameters from Another Database

Post by AndreyZ » Wed 05 Jun 2013 12:58

I am glad I could help. If any other questions come up, please contact us.

Post Reply