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
0
Mao
2/18/2015 10:14:57 PM
embarcadero.delphi.multi-tier 396 articles. 0 followers. Follow

1 Replies
1113 Views

Similar Articles

[PageSpeed] 20

Mapping dtFmtBCD to dtDouble did the trick.  For example,

    with MapRules.Add do begin
      ScaleMin := 8;
      ScaleMax := 8;
      PrecMin := 12;
      PrecMax := 12;
      SourceDataType := dtFmtBCD;
      TargetDataType := dtDouble;
    end;
0
Mao
2/19/2015 2:51:06 PM
Reply:

Similar Artilces:

How do we control data type mappings when we change the target data base?
We have a physical data model with a target data base of Oracle 8.1.6. We have columns defined a blob and columns defined as long raw in this model. When we changed the target data base to IBM DB2 UDB 7.x Common Server we notice that these column data types get changed to long vargraphic. Is there a way to control the data type mappings? For example, we might want these columns to be blobs in DB2. We have a very similar issue and here is how I got around it. A pretty manual process but it seems to work... I defined domains for the data types which are implemented differentl...

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   ...

How to map "union" type in VC to data type in PB ????
thanks for you help!!! Declare the external function (n) times, one for each member of the union, e.g.: typedef union myData { long x; char y; } void foo( myData z ); .... SUBROUTINE fooX( long x ) LIBRARY "bar.dll" ALIAS FOR foo SUBROUTINE fooC( char c ) LIBRARY "bar.dll" ALIAS FOR foo -- pbm_hopethishelps, Roy Kiesler [TeamSybase] mySybase - http://my.sybase.com "moore" <brmoonc@263.net> wrote in message news:XSNZDziRAHA.202@forums.sybase.com... > thanks for you help!!! > > > ...

Data types mapping
Hi All - I'm trying to get a mapping of the values that the DBI uses when returning the TYPE information for a table. I'm using the following: Postgresql 7.3.2 DBD-Pg 1.21 DBI 1.34_1 FreeBSD 4.8 It seems that the internal Postgresql values are not matching up with what the DBI/DBD::Pg returns, e.g. Field type Postgresql type DBI TYPE integer (int2) 21 5 integer (int4) 23 4 integer (int8) 20 8 varchar 1043 12 timestamp 1184 1184 (ok) text 25 25 (ok) date 1082 9 Any suggestions how to find the complete list for the DBI data type...

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 ...

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 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...

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...

Bug for data type : TwinControl(And several data types to other control)
I find that there is another oddity in the IDE. These irregularities can be found in Delphi Class Explorer. There are types of data that have not been handled properly. And this must be handled so as not to cause an error message that makes work uncomfortable. This got started when I was creating a package project. In this package, I created a new component. In the component I created it, I want to add property. For properties that have common data types like string, integer, double, boolean and some basic data types other no problem. The problem arises when I want to add the Parent...

Multi-Data tier report
Hello,I have to create a report with multiple levels of data processing, and I'm not sure if it's even possible with reporting services. I'm creating a report to display multiple header items (for example multiple promotions), and each of these header items have multiple child table (multiple tv stations for each promotion) items to bind. How can I create this report to support this type of data structure? I can create a stored procedure with multiple select statements to bind all of the layers, but how can I properly bind all of the child tables to the appropriate head...

The conversion of a char data type to a datetime data type resulted....
Hi, I'm trying to insert a date time value into a SQL Server Database field of type date time using a c# web form. I get the following 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" My SQL looks like this: INSERT INTO tblname (fldname) VALUES ('" + DateTime.Now.ToString() + "')" What am I doing wrong?"There is no such thing as a bug, just an unexpected feature." Remove the ToString() method as that is changing the DateTime type t...

A JAVA Vector data type is returned to a powerbuiler ? Data Type
If a java class in jaguar is to pass powerbuiler a vector of strings, what is the pb datatype? I would think: String ls_jag_return[] ABL You can't pass a vector. You will have to pass an array. Carson ___________________________________________________________ Carson Hager Team Sybase Dynamic Data Solutions, Inc. Enterprise Application Studio 3.0 Consulting and Training http://www.dyn-data.com DDS is now hiring EAServer consultants to support its exploding EAServer business! Please submit your resume to ...

The conversion of a char data type to a datetime data type resulted in an out-of-range ...
Hi,I couldn't understand why I can´t convert the date. I use dd/mm/yyyy, and I put the correct sintax in my code: CType(tbVencimento.Text, Date)but it conti nues recording inside of my database like mm/dd/yyyy, why?and every moment I receive this error message: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.Please, help!Thanks a lot!Raphael Amador You should use DateTime.ParseExact to get the format changed.Dim s As Strings = "25/12/2005"Dim d As DateTimed = DateTime.ParseExact(s, "dd/MM/yyyy", Nothing...

Size of string data type / column with char data type in PB
I use PB8 as front end with MS SQL Server database as back end. There is a column of Text data type in database. That column is able to hold large size of data. I created a datawindow to retrieve data from this column. Then I created a non-visual user object data store using this datawindow as dataobject. There is a multiplelineEdit control on a window which allows user to input pages of text. When the =91SAVE=92 button is clicked, the text should be saved into the table through the datastore. The problem is: the text is truncated after saving. Only about 4034 characters are ...

Converting Gridview Checkbox data type into new Label data type
I have a backend page where the client can check boxes of available time slots.  The frontend takes that boolean(bit) value, to change the label property, if False, returns lbl.Visible=false and changes the label text to a hard coded time value (i.e. 5am); using an if statement.  Here is my example...Thank you so much for any input, this site and members are the best. Code Behind:protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)    {        if (e.Row.RowType == DataControlRowType.DataRow)        {            Control a = e.Row.FindControl("Label1");              ...            if (((Label)a) == false)            {                ((Label)a).Visible = false;            }            else            {                ((Label)a).Value = "5";              &nbs...

Bit Data type column from Database to ASP Data grid getting error Cast from type 'DbDataRecord' to type 'Boolean' is not valid.
I have bit Datatype column in my table and I am putting this table into ASP datagrid  I have created a check box in thiscolumn in datagrid using itemtemplate.  so this bit column should have a check box next to it in datagrid but I am getting this when running the app  Cast from type 'DbDataRecord' to type 'Boolean' is not valid. any one know any thing about this issue Hi, khana04: I am not sure about what you are going to do about convert DbDataRecord to Boolean. Would u please show us some code about  it. However, the following code works fine for me to retrive t...

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 *'); ...

How do I define these data types in Delphi 7?
Hi. Our application is compiled in Delphi 7. We need to know what operating system the application is running on. We were using the GetVersionEx windows call. As most people now know, Microsoft has changed the way this works on Server2012R2 and Windows 8.1. I was searching for an alternative. Microsoft recommends to replace calls to GetVersionEx with calls to functions like IsWindows8OrGreater, for example. The article said the include or header file comes with Visual Studios. For the record, I'm using the version of the operating system so I can tell if I'm looking for "...

Delphi 2010 DBExpress data types
Delphi 2006, 2007 and 2009 - DBExpress driver for Oracle, MSSQL and Interbase = recognize numeric(10,0) as TFMBCDField however Delphi 2010 - DBExpress driver for Oracle, MSSQL and Firebird = recognize numeric(10,0) as TLargeIntField So if someone try to migrate from versions before 2010 need to remove all the fields from clientDataSet and add again to "migrate" to the new type (TLargeIntField) is this the only way ? Toni Wickert wrote: > So if someone try to migrate from versions before 2010 need to remove > all the fields from clientDataSet and add again to "mig...

Help : Disallowed implicit conversion from data type ntext to data type varchar,.
Hi all,        i have feedback table with column comments1(varchar) & comments(ntext) ..i tried to copy the content from column Comments to another comments1 column,It shows the follwing error..My Query is ,                 "   update feedback set comments1=comments    "Error :Disallowed implicit conversion from data type ntext to data type varchar, table 'Test.dbo.feedback', column 'comments1'. Use the CONVERT function to run this query. ...

Re-mapping data types between tables
Hi again, Another question on migrating from DB2 to SQLServer. DB2 has CLOB and BLOB data types that need to go to TEXT & IMAGE for Sqlserver. The CLOB has a defnition like CLOB(n) where n is a number (eg CLOB(1230000). The first problem is that the reverse engineering of a DB2 (AS400)database produces CLOB(123000, -1). So firstly how do I stop the ",-1" appearing? I assume that this is in the DBMS definition, but cannot see where it is. If I can't get rid of the ",-1", then how can I get the CLOB to map to TEXT for SqlServer? I have changed the ...

The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Hi Guys, I've tried reseasrching this problem on the internet without success. I'm UK based and Classic ASP trained but having problems with asp.net (VB) Inserting "Date" Data into an inherited MS-SQL Server 2008 table's date field. 1.) In webconfig's System.Web section I have added the following: <globalization culture="en-GB" uiCulture="en-GB" /> ' so I'm now hoping all dates can be handled as dd/MM/yyyy! 2.) In SQL Server the "Default Value or Binding" for the quote_date field is set to '...

How i get the data type mappings for my TableColumns
Hi DevTeam, sorry i'm a newbie and i have a question :-) If i use the GetSchema from my Connection i get all Information about: -> Tables -> Views -> Columns .... but i get no information about the data type mapping. I need the relation information about the system tables to get the right data type mapping information about my fields (Columns). What is the right relation between the tables to get this information and need also the data type mapping information for my Domains. Thanks ...

conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
  When I run this error I get this error  ' The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.' select distinct pro.prodname, pro.price, pro.description, pro.fromdate, pro.todate, pro.pic1 from products pro inner join booking on pro.category=booking.category where pro.category=1 and '12/11/2008' between pro.fromdate and pro.todate and '18/12/2008' between pro.fromdate and pro.todate and '12/11/2008' not between booking.checkin and booking.checkout and '18/12/2008' not between booking.chec...

Web resources about - Data Type Mapping (FireDAC) - embarcadero.delphi.multi-tier

Information mapping - Wikipedia, the free encyclopedia
Information Mapping is a technique that divides and labels information to facilitate comprehension, use, and recall. It was originally developed ...

Business Mapping API
If your business operates multiple apps, the Business Mapping API lets you map the same person's user ID across them.

US Census Bureau Adds Mapping Application on Facebook
The U.S. Census Bureau is launching a huge nationwide campaign incorporating social media, broadcast media and print to encourage people to fill ...

Mobile Developer (Android), HERE Crowd Mapping at HERE, a Nokia business in Frankfurt , Schwalbach or ...
The Community Mapping product team in the HERE Core Platform Group (CPG) is looking for a passionate and experienced mobile app developer to ...

iMindQ (mind mapping) - Brainstorming app on the App Store on iTunes
Get iMindQ (mind mapping) - Brainstorming app on the App Store. See screenshots and ratings, and read customer reviews.

Claims of a cover-up and millions wasted in NSW native vegetation mapping saga
A bitter row over how to map NSW's precious natural habitat has split the state's environment ministry, prompting accusations of millions of ...

Losing the plot: how native vegetation mapping went feral
A simmering dispute over native vegetation mapping in NSW is set to come a head this year as the Baird government prepares to overhaul its biodiversity ...

Lenovo and Google are about to blow the lid off digital indoor mapping
Navigation apps are some of my most frequently used mobile apps. But Google Maps, Apple Maps, and all the other maps apps out there can only ...

New metabolic mapping reveals how the human brain is connected
The quest to understand ourselves by modeling the human brain continues this week with news from Germany, where a team of researchers discovered ...

Mapping The Geography of 2015 Through Massive News Mining
What 1.48 billion location mentions across 200 million global news articles can show us about the geography of 2015’s news

Resources last updated: 2/27/2016 10:53:07 PM