Book a Demo

Author Topic: Custom Datatypes  (Read 3382 times)

mikepolson

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Custom Datatypes
« on: August 22, 2013, 07:30:11 am »
Hi All - I'm trying to define custom database datatypes, and also create a SQL 2012 databasereference data import file.  However, I'm not clear on the domain values for several of the xml attributes.  Specifically:

  • User  - assuming this should be changed from "0" to "1" to specify this is a user defined datatype
  • DatatypeID - the values seem to vary and I can't infer the patterns - what is the significance of this attribute?

I want to create a user-defined datatype called SourceSystems, which is a char(2) not null datatype.

Here's an example that I cut from the SQL 2008 DDL xml:

Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<RefData version="1.0" exporter="EA.25">
      <DataSet name="Model Data Types - Code and DDL" table="t_datatypes" filter="Type='#Type#' and ProductName='#ProductName#' and DataType='#DataType#'" stoplist=";DatatypeID;">
            <DataRow>
                  <Column name="Type" value="DDL"/>
                  <Column name="ProductName" value="SQL Server 2012"/>
                  <Column name="DataType" value="bigint"/>
                  <Column name="Size" value="0"/>
                  <Column name="MaxLen" value="0"/>
                  <Column name="MaxPrec" value="0"/>
                  <Column name="MaxScale" value="0"/>
                  <Column name="DefaultLen" value="0"/>
                  <Column name="DefaultPrec" value="0"/>
                  <Column name="DefaultScale" value="0"/>
                  <Column name="User" value="0"/>
                  <Column name="GenericType" value="bigint"/>
                  <Column name="DatatypeID" value="1025"/>
            </DataRow>
« Last Edit: August 22, 2013, 07:31:25 am by mikepolson »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Custom Datatypes
« Reply #1 on: August 22, 2013, 08:59:59 am »
Have you tried setting it via the gui and then exporting it?