Default values in dataTable



I am building a Pocket PC application in C# and I tryed to get the Default
values of columns in a given table with the following SqlCeCommand:

SqlCeCommand columns = new SqlCeCommand(@"SELECT COLUMN_NAME, TYPE_NAME,
COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS,
INFORMATION_SCHEMA.PROVIDER_TYPES WHERE
INFORMATION_SCHEMA.COLUMNS.DATA_TYPE=INFORMATION_SCHEMA.PROVIDER_TYPES.DATA_
TYPE AND TYPE_NAME NOT IN
('ntext','nchar','image','binary','varbinary','uniqueidentifier') AND
COLUMN_NAME NOT IN ('s_Generation') AND TABLE_NAME = ?", this.sqlce);

When I Execute the command and try to read the COLUMN_DEFAULT "String" with
the following command:

dtr.GetString(2);

I get an SqlNullValueException. I know that the default value in the
database is set to NULL, but can't you read a NULL value and then set the
defautl value in a dataTable to NULL?

Is there another way to get that COLUMN_DEFAULT without getting the
exception?

THANKS!!!


.



Relevant Pages

  • Re: how to run EXE from storage card
    ... The nest step after this is I can save the log of Hopper in storage ... You can create a shortcut that starts a program with a given command line ... paramenters from a storage card on windows Mobile device.I have EXE ... Starting on Pocket PC: To open the run dialog on Pocket PC hold down ...
    (microsoft.public.pocketpc.developer)
  • Re: .BAT files in PPC?
    ... project with Perl and a common console (name is ... > Command shell for the Pocket PC 2003 device. ... > When the SIP is up the window does not scroll to keep the command prompt> visible at the end of a command. ... > cmd does not shut down when the "X" button is tapped. ...
    (microsoft.public.pocketpc)
  • Re: Dynapath Delta 20 narrow slot problem
    ... I am trying to get my delta 20 to do a narrow pocket using the ... cutter radius on up to anything I like. ... Try changing the G7 (pocket command) to G0. ...
    (alt.machines.cnc)
  • Re: .BAT files in PPC?
    ... Command shell for the Pocket PC 2003 device. ... SUPPORTED PLATFORMS: ... cmd does not shut down when the "X" button is tapped. ...
    (microsoft.public.pocketpc)
  • Re: SqlCeDataAdapter problem
    ... used in the insert command. ... > SqlCeCommand selectCommand = conn.CreateCommand; ... > insertCommand.Parameters.Add(new SqlCeParameter ("@col", ... > SqlCeCommand updateCommand = conn.CreateCommand; ...
    (microsoft.public.dotnet.framework.compactframework)

Loading