Is TSQLStoredProc a singleton?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jokerm
Posts: 1
Joined: Fri 13 Oct 2017 18:04

Is TSQLStoredProc a singleton?

Post by jokerm » Fri 13 Oct 2017 18:09

Hi, I'm new using this components of your library and I want to use TSQLStoredProc component, this is in a datamodule file in delphi berlin.
So the thing is that I have this code

Code: Select all

    with spPersonaAdd do
    begin
      Params.Clear;
      Params.CreateParam(ftString, 'nombre', ptInput);
      Params.CreateParam(ftString, 'apellidoP', ptInput);
      Params.CreateParam(ftString, 'apellidoM', ptInput);

      ParamByName('nombre').AsString := nombre;
      ParamByName('apellidoP').AsString := apellidoP;
      ParamByName('apellidoM').AsString := apellidoM;
      ExecProc;
    end;
From the UI I called this method and SP is executed successfuly and a new user is created into DB, but if I try again (in runtime) it doesn't execute the SP again, so no new record is added.

So my question is, is there a way to reset the TSQLStoredProc ? or how should I aboard this?

Thanks in advance

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Is TSQLStoredProc a singleton?

Post by ViktorV » Tue 17 Oct 2017 07:32

Unfortunately, we cannot reproduce the issue.
In order to get a detailed answer, please compose a small sample demonstrating the issue and send it to us via form e-support: https://www.devart.com/company/contactform.html, including scripts for creating database objects.

Post Reply