Data type translation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Barnett

    #1

    Data type translation

    Hi,
    I'm using GetSchemaTable( ) to retrieve the schema information for a
    series of tables in a database. One of the columns returned to me is the
    "DataType" column, which gives me the .NET data type of the column.

    What I want is the equivalent data type that would be used in the SQL
    definition of the column, were you to define it in a create table command.
    Is there any way to get .NET to convert it's data type in to an SQL data
    type? For example, rather than using System.Int16, I would want SmallInt.

    Thanks
    Steve


Working...