Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Parameter Order vs ParamBy Name |
Wed, Feb 5 2014 9:10 AM | Permanent Link |
Chris Clark | Hi
I have a stored procedure which takes 2 GUIDs as Parameters. When running the procedure, In Delphi I am setting the values using ParamByName. While refactoring etc.. at some point the order of the parameters changed so they don't reflect the order in the EDB stored procedure. When referring to these values within the stored procedure they are incorrect. Example Create Procedure "Proc1: (IN GUID1 GUID COLLATE UNI_CI, IN GUID2 GUID COLLATE UNI_CI) In Delphi if the Params are in the order GUID2, GUID1 and I set them using EDBStoredPro.ParamByName('GUID1').AsString := ''; EDBStoredPro.ParamByName('GUID2').AsString := ''; The Values are transposed. |
Wed, Feb 5 2014 10:24 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Chris,
<< When running the procedure, In Delphi I am setting the values using ParamByName. While refactoring etc.. at some point the order of the parameters changed so they don't reflect the order in the EDB stored procedure. When referring to these values within the stored procedure they are incorrect. >> I'm not seeing this with 2.15. I'm using this: CREATE PROCEDURE "ParamOrderTest" (IN "GUID2" VARCHAR COLLATE ANSI, IN "GUID1" VARCHAR COLLATE ANSI) BEGIN SET LOG MESSAGE TO 'GUID1: '+GUID1+' GUID2: '+GUID2; END procedure TForm1.Button1Click(Sender: TObject); begin with EDBStoredProc1 do begin Prepare; ParamByName('GUID1').AsString:='Test1'; ParamByName('GUID2').AsString:='Test2'; ExecProc; end; end; procedure TForm1.EDBStoredProc1LogMessage(Sender: TObject; const LogMessage: String); begin Memo1.Lines.Add(LogMessage); end; The output is: GUID1: Test1 GUID2: Test2 Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 6 2014 7:13 AM | Permanent Link |
Chris Clark | On 2014-02-05 15:24:47 +0000, Tim Young [Elevate Software] said:
> > > I'm not seeing this with 2.15. I'm using this: > hmm Strange, I'm on 2.14, I'll upgrade and retest. -- Chris Clark |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |