KMBMW moving from Firedac to Unidac errors

Home Forums kbmMW KMBMW moving from Firedac to Unidac errors

Viewing 1 reply thread
  • Author
    Posts
    • #54990
      G
      Participant

      Hi,
      I have been using KBMMW for years, mostly using firebird and UNIDAC.. No very stable.  I have written a phone app for a customer  ( firemonkey Android) works fine. The KBM server talks to MS SQL server. Im somewhat new to SQL server.

      They didnt have Unidac and didnt want to buy it (Which is what ive used for years in my KBMMW firebird apps with no issues), so we decided to use firedac since it came with delphi

      After a couple of months, there was some weird behavior with the KBM server. Locking up etc. The only difference I could think of is that I wasnt using UniDac.

      So, i decided to build a KBM server for them using my Unidac components. Compiles file..

      Seems to work fine on my views/queries, but when calling any stored procedures, I get data conversion exceptions..

      For instance

      1. “Converting data type nvarchar to int (SERVER)”
      2. “Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to fun this query. (SERVER)”

      Ive tried everything I know to try.. Any idea why my firemonkey client works well with firedac/KBMMW server and with UNIDAC I get all of those errors?

      Im banging my head against the wall.. Any help would be appreciated.

      BTW, here is an example of a query..

      TKBMMWClientQuery on the client side..

      ValidateDocumentQuery.Close;
      ValidateDocumentQuery.Query.Clear;
      ValidateDocumentQuery.Query.Add(‘declare @b bit’);
      ValidateDocumentQuery.Query.Add(‘declare @r varchar(50)’);
      ValidateDocumentQuery.Query.Add(‘execute Wx_tagteam_validatedocument :vdoc_no, :vdoc_type, @success = @b output, @doc_result = @r output’);
      ValidateDocumentQuery.Query.Add(‘select @b as success,@r as doc_result’);

      ValidateDocumentQuery.Params.ParamByName(‘vdoc_no’).AsString := doc_no;
      ValidateDocumentQuery.Params.ParamByName(‘vdoc_type’).AsString := doc_type;

      ValidateDocumentQuery.Open;

       

       

      Gordon

    • #54995
      TomYU
      Participant

      For such a complicated SQL, it is better to write a method on the server side.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.