[Firedac][Phys][Ora]-335. Parameter [p_beg_no] data type unknown.

[Firedac][Phys][Ora]-335. Parameter [p_beg_no] data type unknown.
Hint: Specify TFDParameter.data type or assign TFDParam value before Prepare/Call

I am trying to use a simple TFDConnection and SQLQuery - Oracle 11g

These 2 commands work 
  FDConnection1.ExecSQL('Truncate table Reptnos');
  FDConnection1.ExecSQL('Insert into Reptnos values (123456)');
This one returns the above error:
  FDConnection1.ExecSQL('Insert into Reptnos values (:p_beg_no)');

My code:

type
  TForm3 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    start_sequence: TEdit;
    end_sequence: TEdit;
    FDPhysOracleDriverLink1: TFDPhysOracleDriverLink;
    FDConnection1: TFDConnection;
    FDGUIxWaitCursor1: TFDGUIxWaitCursor;
    test_sql_btn: TButton;
    Close_btn: TButton;
    procedure test_sql_btnClick(Sender: TObject);
    procedure Close_btnClick(Sender: TObject);

var
  Form3: TForm3;
implementation

{$R *.dfm}

procedure TForm3.test_sql_btnClick(Sender: TObject);
var
   P_beg_no:      Tfdparam;
begin

  FDConnection1.ExecSQL('Truncate table Reptnos');
  FDConnection1.ExecSQL('Insert into Reptnos values (123456)');

  FDConnection1.ExecSQL('Insert into Reptnos values (:p_beg_no)');

end;

Questions:

How do I set up variable p_beg_no as a parameter with type of integer?
How do I assign value? Value should be: StrToInt(Start_sequence.text)
How do I pass this parm to FDConnection1.ExecSQL statement?

Any help will be appreciated! Thanks.
0
william
2/27/2014 1:49:11 AM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

2 Replies
3336 Views

Similar Articles

[PageSpeed] 54

Hello William

http://docwiki.embarcadero.com/RADStudio/XE5/en/Executing_Commands_(FireDAC)

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
FireDAC - InterBase, Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, 
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
2/27/2014 4:23:59 AM
Many thanks to you Dmitry!
I have looked at this several times but I never tried the second  method.

  FDConnection1.ExecSQL('Insert into Reptnos values(:starting)',[strtoint(start_sequence.text)]);
 This seems to work ok.

Again, thanks.

> {quote:title=Dmitry Arefiev wrote:}{quote}
> Hello William
> 
> http://docwiki.embarcadero.com/RADStudio/XE5/en/Executing_Commands_(FireDAC)
> 
> -- 
> With best regards,
> Dmitry Arefiev / FireDAC Architect
> FireDAC - InterBase, Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, 
> DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
william
2/27/2014 4:09:36 PM
Reply:

Similar Artilces:

FireDAC exception
Hello. In an application built with Delphi XE6, which accesses an Informix database, the following exception is raised: *Project app.exe raised exception class EFDException with message '[FireDAC][Phys][Infx]-335. Parameter [CASHIER] data type is unknown. Hint: specify TFDParam.DataType or assign TFDParam value before Prepare/Execute call'* The query associated with the exception is the following: {code} with CashierQuery do begin if not Prepared then begin SQL.Clear; Connection := FDManager.Connections[0]; SQL.Add('select *'); ...

XE6 regression: [FireDAC][Phys][Ora] ORA-00942: la tabla o vista no existe
I have a program that works in XE5. In XE6 doing a select in Oracle 11 works, but when I try to update it gives ORA-00942 or something like: First chance exception at $7C812FD3. Exception class EVariantInvalidArgError with message 'Invalid argument'. Process PruebaFiredac.exe (1656) I've been able to reproduce it with a simple program like this (sometimes it fails the first time I try, other times it works in the first update and fails in the second): {code} procedure TForm1.Button1Click(Sender: TObject); begin with fdquery do begin Close; SQL.Text := Edit...

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

Data Type Mapping (FireDAC)
We have a client/server applications that were written in Delphi 5 which use BDE and SQL Server 2000. I converted the middle tier to the Delphi XE 7 and FireDAC. I try to avoid converting the client app for now. Basically, the client app calls the middle tier, and the middle tier returns an OLE Variant data and this OLE Variant would assign to the ClientDataSet. Mostly, the client app works normally. However, I encountered one of a problem so far that I cannot resolve. There is column in a database t hat has been defined as NUMERIC(12, 8). The problem is that this field is missing from the OLE Variant data. I think that because it returns a different data type (field type). I am trying to do a data type mapping, but I am not sure if I did it correctly. For example, with MagnumDBObject.FormatOptions do begin OwnMapRules := True; with MapRules.Add do begin SourceDataType := dtDateTimeStamp; TargetDataType := dtDateTime; end; with MapRules.Add do begin SourceDataType := dtTime; TargetDataType := dtDateTime; end; *with MapRules.Add do begin* *ScaleMin := 8;* *ScaleMax := 8;* *PrecMin := 12;* *PrecMax := 12;* *SourceDataType := dtBCD;* *TargetDataType := dtDouble;* *end;* end; Thank you, Mao Mapping dtFmtBCD to dtDouble did the trick. For example, with MapRules.Add do begin ScaleMin := 8; ScaleMax := 8; PrecMin...

Executing DataSnap server methods using FireDAC
Hi, I am using FireDAC to connect my client application to a DataSnap Server and I am using TFDStoredProc to execute server methods. This works fine. I am having a problem because one of the server methods has a TStream parameter, Does anyone know if it is possible to pass this type of parameter to the server side using TFDStoredProc? Thanks in advance. > I am having a problem because one of the server methods has a TStream parameter, Does anyone know if it is possible to pass this type of parameter to the server side using TFDStoredProc? TFDStoredProc does not support TStream a...

FireDac
Hello, I am using Delphi XE4 and facing a problem with FireDac (8.0.5) and MySQL. I'm trying to get the last 100 records from a large table (20 million rows). When I run the following SQL: {code}select * from largetable order by FId limit 100{code} in MySQL Workbench it returns in 0.2 seconds. When I run the above SQL in Delphi through an ADQuery it never returns (Delphi freezes). Any Ideas ? Thank you ...

Delphi function parameter data type and asa char, varchar & long varchar
I'm currently writing my own smtp email function using Delphi 7. This function which is located in an external dll will be called by Sybase. I have an issue between Sybase and the Delphi function parameter type e.g. when Sybase send a field data type varchar or Long varchar, what Delphi data type should be used ? If someone has some experience and/or sample code... Thanks in advance. See and tanslate to Delphi pascal "extfnapi.h". To provide values for INOUT or OUT parameters, use the set_value API function. To read IN and INOUT parameters, use the get_...

GUID Ending With X'00' Causes FireDAC Exception [FireDAC][DatS]-10. Fixed length column [field-name] data length mismatch.
I have been having intermittent difficulties with GUID fields in Interbase. I have finally been able to determine that I can reliably recreate the FireDAC exception by making sure that the low order byte of the GUID posted to the database has the value X'00'. Likewise, if I ensure that the low order byte does not have this value the FireDAC exception never appears. This looks suspiciously like something is counting a length by using null-terminated string logic. A GUID is a 128 bit number and any value from all X'00' through all X'FF' is valid, so null-...

Parameters in sql, xml type blocks: data types
I have some leftover dreamweaverMX asp.net code that contains a few sql/xml Parameter blocks in an admin-insert-data script: <Parameters> <Parameter Name="@ProductType" Value='<%# IIf((Request.Form("ProductType") <> Nothing), Request.Form("ProductType"), "") %>' Type="WChar" /> as far as specifying a Type, for strings it looks like WChar works, and for dates, Date. What about for truefalse-boolean fields, and numeric integers? thanks chum...

How to convert varchar data type into datetime data type without data lose
Hi all, i have stored date as varchar(30) data type and Date format is dd/MM/yyyy now i have to convert it into datatime data type can u help me in query ?  i have 330 records and each recod contain the Date in format of dd/MM/YYYY but due to varchar data type i can not perform calculation on Date so i have to convert into datetime without data lose. please help me in this regard. Best RegardsRameezWaheed  life is name of learning!Mark as an answer if it helps You can check these posts http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2039108&SiteID=17   ...

parameter data type
hello, I am using an sql datasource control in my application. It takes a parameter value which is of type boolean. The parameter is passed through a dropdown control. I am adding an item called "choose one " to the drop down list other than two items each representing a boolean value.. There is a gridview which is used to display the results returned by the query. So on page load the page has only the drop down and if we select an item from the dropdown the grid will get populated based on the boolean value associated with it that is how I want it to work. But since on page load ...

It is FireDAC after all
Marco announces FireDAC: http://blog.marcocantu.com/blog/firedac_announced.html -- Nick The Buy Now button almost work ;-) > {quote:title=Nick Hodges wrote:}{quote} > Marco announces FireDAC: > > http://blog.marcocantu.com/blog/firedac_announced.html > That was fast :) delete this message > What's the price for XE3 Pro licensees? Introductory price is $399 -- With best regards, Dmitry Arefiev / FireDAC Architect http://www.embarcadero.com/products/rad-studio/firedac > All the links I found just go to a page that lets you purchase Delp...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. Sebastian Kumor wrote: > Hello, > I have FireDac components installed to Delphi Xe2, > My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. > It doesn't work. Mayb...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source to remove this issue. To set the Param on NULL value before executing the query I do: {code} with qryExample.ParamByName('Example_id') do Begin DataType:=ftInteger; Clear; // Bound := True; End; {code} > {quote:title=Robert Triest wrote:}{quote} > To set the Param on NULL value before executing the query I do: >...

FireDAC for Delphi 2007 ?
Hello, I would like to know if FireDAC Client/Server Pack can be installed on Delphi 2007 pro. Thanks, Regards, Emmanuel Lion FireDAC Client/Server Pack for XE5 - No FireDAC Client/Server Pack for XE4/XE3, see: http://support.embarcadero.com/article/42970 M. E.L. wrote: > Hello, > > I would like to know if FireDAC Client/Server Pack > can be installed on Delphi 2007 pro. > > Thanks, > Regards, > > Emmanuel Lion > On 02.10.2013 18:17, quinn wildman wrote: > FireDAC Client/Server Pack for XE5 - No > FireDAC Client/Server Pack ...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source to remove this issue. To set the Param on NULL value before executing the query I do: {code} with qryExample.ParamByName('Example_id') do Begin DataType:=ftInteger; Clear; // Bound := True; End; {code} > {quote:title=Robert Triest wrote:}{quote} > To set the Param on NULL value before executing the query I do: >...

unknown parameter type
Hi group, I can't seem to find a way to get this chunk of code working. I've been hacking a Perl script which is meant to catch the audio data from a microphone. I need a bit of help with Win32::API and winmm.dll as well. #!/perl use strict; use Win32::API; Win32::API->Import(winmm => q{ LRESULT waveInGetDevCaps( UINT_PTR DeviceID, LPWAVEINCAPS pwic, UINT cbwic )} ); ... and this is what I get Win32::API::parse_prototype: WARNING unknown parameter type 'LPWAVEINCAPS' at C: Is that actually a lack of Win32::API? I haven't t...

FireDac Delphi Xe2
Hello, I have FireDac components installed to Delphi Xe2, My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. It doesn't work. Maybe someone know what I have to change in FiredAc source ro remove this issue. I suggest to the FireDAC newgroup. You'll probably get a better response there. Sebastian Kumor wrote: > Hello, > I have FireDac components installed to Delphi Xe2, > My version of FireDac is 8.0.1 but in this version I have probelm with TAdoquery with StrsEmpty2Null param. > It doesn't work. Mayb...

FireDAC?
I'm starting a new development initiative and want to pick the tech that will last the longest and have the most complete feature set. Elsewhere someone noted that DBExpress has been deprecated in favour of FireDAC. I seem to have missed the announcement of FireDAC. So I'm looking for any info on what FireDAC is and why I should use it. Any links? I just discovered the FireDAC newsgroup and the first message there is an announcement with links to the product info and documentation. So my basic question (What is it?) is answered. Still don't know the future of DBExpr...

firedac parameter create
Where do I go to find a solution to my problem of: Specifying TFDParameter.data type or assigning TFDParam value to a parameter. My program returns: [Firedac][Phys][Ora]-335. Parameter [p_beg_no] data type unknown. Data type should be integer. william waddeell wrote: > Where do I go to find a solution to my problem of: Specifying TFDParameter.data type or assigning TFDParam value to a parameter. > My program returns: [Firedac][Phys][Ora]-335. Parameter [p_beg_no] data type unknown. Data type should be integer. embarcadero.public.delphi.database.firedac newsgroup. -- Jeff Ove...

The conversion of a char data type to a datetime data type!!
hello all .. I have a form that includes two textboxes (Date and Version) .. When I try to insert the record I get the following error message .. seems that something wrong with my coversion (Data type)"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.The statement has been terminated."   in my SQL database I have the date feild as datetime and the version as nvarchar(max) this is the code in the vb page .. Can you please tell me how to solve this problem?Imports System.Data.SqlClient Imports system.web.configuration Partial Class Admin_emag_insert Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Record_DateTextBox.Text = DateTime.Now End Sub Protected Sub clearButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles clearButton.Click Me.VersionTextBox.Text = "" End Sub Protected Sub addButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles addButton.Click Dim objConnection As SqlConnection Dim objDataCommand As SqlCommand Dim ConnectionString As String Dim record_date As Date Dim version As String Dim emagSQL As String 'save form values in variables record_date = Record_DateTextBox.Text version = VersionTextBox.Text ConnectionStrin...

data type DATA
just want to ask why i still encounter "Type Expected" error in the DATA data type. though i already imports the System.Data.SqlClient...

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
After testing out the application i write on the local pc. I deploy it to the webserver to test it out. I get this error. System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Notes: all pages that have this error either has a repeater or datagrid which load data when page loading. At first I thought the problem is with the date, but then I can see that some other pages that has datagrid ( that has a date field) work just fine. anyone having this problem before?? hopefully you guys can help...

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
After clicking my update button I'm receiving this error:    The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been...

Web resources about - [Firedac][Phys][Ora]-335. Parameter [p_beg_no] data type unknown. - embarcadero.delphi.firedac

Resources last updated: 3/8/2016 3:47:53 PM