reading columns with default values

reading columns with default values

Postby wusal » Wed 06 Jul 2005 13:44

i have got a table with some default values in some columns.
when i read data with a dataAdapter or a dataReader, then de type of these columns, where i have a default value, is null.

can anybody help me?
wusal
 

Postby wusal again » Wed 06 Jul 2005 14:00

the table is:

CREATE TABLE BENUTZER

(

BENUTZERKENNUNG VARCHAR2(256 BYTE) NOT NULL,

KENNWORT VARCHAR2(256 BYTE),

VORNAME VARCHAR2(25 BYTE),

NACHNAME VARCHAR2(25 BYTE),

BERECHTIGUNG VARCHAR2(32 BYTE),

GUELTIG CHAR(1 BYTE),

ABTEILUNG VARCHAR2(12 BYTE),

MEISTEREI VARCHAR2(12 BYTE),

MEISTEREILANGTEXT VARCHAR2(40 BYTE),

LESEBERECHTIGUNG NUMBER DEFAULT 1,

TELEFON VARCHAR2(40 BYTE),

EMAIL VARCHAR2(80 BYTE),

ZIELSMS NUMBER(1) DEFAULT 0,

ZIELEMAIL NUMBER(1) DEFAULT 0,

INFOVON DATE DEFAULT sysdate,

INFOBIS DATE DEFAULT sysdate+7,

INFOZEIT_KZ NUMBER DEFAULT 0,

SMS_STILLSTAND_AKTIV NUMBER(1) DEFAULT 0,

SMS_STILLSTAND_DAUER NUMBER(4) DEFAULT 120,

SMS_STILLSTAND_GESENDET NUMBER(1) DEFAULT 0

)
wusal again
 

Postby Oleg » Fri 08 Jul 2005 13:01

Default value of a column in a table is used by server only. There's no way you can get it on the client. Moreover, in your case it is senseless because you use default values defined as expressions, for example, "sysdate", or "sysdate+7". This values can not be correctly computed on the client. However, you can generate typed dataset and define the default values for client. For more information read in MSDN about typed datasets.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56


Return to dotConnect for Oracle