2

I'm having some problem about TSQLStoredProcedure. Here is the code:

storedproc->ParamByName("A")->AsInteger = adataset->FieldByName("AA")->AsInteger;
storedproc->ExecProc();

param "A" is declared integer in the form (and it's 29 in the program). Also the stored procedure has no errors. I'm sure of it. Database is Oracle 11g. By the way, as storedproc is executed an exception occurred:

... 
EBcdException with message '<0000001:000000010000000:00000063612>' is not a valid BCD value
...

All was working fine with BDE but now, using dbexpress, there is this problem. I searched over the internet for some days and I did not find an answer.

I thank you in advance and beg a pardon for my English.

Francesco

Update

I searched over the web. I found something interesting at:

https://forums.codegear.com/thread.jspa?messageID=43223&tstart=0 http://www.delphigroups.info/2/8/750511.html

I decide to make some test:

SQLQuery->ParamByName("f1")->AsString = Edit1->Text;
SQLQuery->ExecSQL();

It works. Not the same for

SQLQuery->ParamByName("f1")->AsInteger = StrToInt(Edit1->Text);       //ERROR DBX Error: Invalid Field Type.
SQLQuery->ParamByName("f1")->AsFloat = StrToFloat(Edit1->Text);      //ERROR DBX Error: Invalid Field Type.
SQLQuery->ParamByName("f1")->AsBCD = StrToInt(Edit1->Text);          //ERROR ORA-06502: PL/SQL: error: ... ORA-06512: at line 1.
SQLQuery->ParamByName("f1")->AsFMTBCD = StrToBcd(Edit2->Text); //ERROR ORA-06502: PL/SQL: error: ... ORA-06512: at line 1.

or by using TSQLStoredProc. So now I call my pl/sql stored proc by TSQLQuery. I use "AsString" to pass values to parameters. Weird. How does dbexpress map types? Thanks in advance.

Tim Post
  • 33,371
  • 15
  • 110
  • 174
Francesco
  • 1,742
  • 5
  • 44
  • 78
  • 1
    Please just edit your question if you want to provide clarification :) I've merged your answer into your question. Answers should be just that, answers that resolve this issue, not additional questions. – Tim Post Mar 31 '11 at 17:21

0 Answers0