TUniStoredProc and Sybase: How to deal with Result params

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 26 Apr 2012 10:36

Hello,

When saving *.dfm, the text of the procedure call is not saved itself, only the name and parameters are saved. Please check the *.dfm file after closing Delphi. There must be all procedure methods in the object YourStoredProc: TUniStoredP section.

derekwildstar
Posts: 32
Joined: Sun 01 Apr 2012 14:12
Location: Olinda / PE / Brasil
Contact:

Post by derekwildstar » Thu 26 Apr 2012 13:41

Hi!

Well, you say that the parameters are saved on DFM, right? I will see this tomorrow (today I'm out of work). Later I will put the answer here.

Thank you
AlexP wrote:Hello,

When saving *.dfm, the text of the procedure call is not saved itself, only the name and parameters are saved. Please check the *.dfm file after closing Delphi. There must be all procedure methods in the object YourStoredProc: TUniStoredP section.

derekwildstar
Posts: 32
Joined: Sun 01 Apr 2012 14:12
Location: Olinda / PE / Brasil
Contact:

Re: TUniStoredProc and Sybase: How to deal with Result param

Post by derekwildstar » Fri 27 Apr 2012 20:20

I've made a Test and I saw the following after convert from BDE to UniDAC:

1. All TUniStoredProc have the parameters correctly assigned
2. The TUniConnection has 99% of the properties correctly assigned
3. The TUniConnection is disconnected
4. I connected on designtime the TUniConnection
5. All the linked TUniStoredProc have no parameters anymore, but inside the DFM they are!
6. I disconnected on designtime the TUniConnection
7. All the linked TUniStoredProc stays without parameters, but inside the DFM they are!
8. Close and reopen the Delphi IDE. Result: nothing change.

Well, the parameters are inside the dfm and surely I can use then in runtime, but there are no way to use these params on designtime. This is normal?

I can do more tests if you need them.

Thanks in Advance.

derekwildstar
Posts: 32
Joined: Sun 01 Apr 2012 14:12
Location: Olinda / PE / Brasil
Contact:

Re: TUniStoredProc and Sybase: How to deal with Result param

Post by derekwildstar » Sat 28 Apr 2012 20:07

I did another test at home with my postgres database.

1. I put a TUniConnection on the form
2. I setup the TUniConnection correctly with the "KeepDesignedConnect=False"
3. I connected the TUniConnection
4. I put a TUniStoredProc on the form
5. I linked the TUniStoredProc with the TUniConnection
6. I selected one available stored procedure

After that I saw the command like this: "SELECT idu_usuarios(:pmodo, :psm_usuarios_id, :pva_nome, :pva_login, :pch_senha, :pva_email, :pbo_superusuario)".

Also, all the parameters was showing on the Parameters tab.

Everything was correct. I double checked the parameters and update one of them with the -1 value (the value is only an example. Any value produces the same result).

After that i clicked on the form with the right button and selected "view as text". All my parameters was there and the custom value (-1) also. The procedure name (idu_usuarios) was there as well. The command, as you said before, was not there because it is dynamically created.

With sure of parameters presence I pressed the ALT+F12 to return to form visualization and double clicked the TUniStoredProc. For my suprise, the SQL command has gone and all my parameters as well! Taking a look again on the dfm text I saw all my parameters intact.

Back to the form view I double clicked on the TUniStoredProc and clicked on the "Create SQL" button. Doing this seems to recreate the SQL command (this i know!) and recreate all the parameters also, so my custom value (-1) is lost!!!!

So that's the question. This behaviour is correct?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniStoredProc and Sybase: How to deal with Result param

Post by AlexP » Fri 04 May 2012 10:33

hello,

I have answered you at our forum. Please view the following topic: http://forums.devart.com/viewtopic.php?t=24033

Post Reply