views:

39

answers:

0

I want to know domain type of scema for a select in SQL Anywhere.

SQL:

CREATE DOMAIN "followinteger" INTEGER NULL;

CREATE TABLE "DBA"."test" (
    "follow" "followinteger" NOT NULL,
    "test" INTEGER NULL,
    PRIMARY KEY ( "follow" ASC )
);

C#

SACommand command = conn.CreateCommand();
command.CommandText = "SELECT * FROM USERS";
SADataReader reader = command.ExecuteReader(CommandBehavior.SchemaOnly);

foreach (DataRow dr in schema.Rows)
{
    DataRow row = table.NewRow();
    dr.ItemArray[14]; // <-- this is supposed to be the domaintype
}

Is this the way to find the domaintype?