🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3932

Default values on insert MSSQL7

#3932
From: Robi Kihm
Date: Sun, 19 May 2002 14:13
33 lines
2031 bytes
Hi

I am not sure if this question has been asked before , I have
searched hi and lo for an answer , but cannot get anything specific

The problem is

I have a MSSQL table with all columns defined as NOT NULL , with approriate
default values defined in the table def.

If I issue a insert into table (Field1,Field2) values ('a','b') from Query
Analyzer
all non specified fields in the insert update with their correct DEFAULT
values.

Using ADO (Adonis dataset) , adding a new record from a dbgrid into the
same table give a 'non null column cannot be updated with a null value' or
some
such equivelant message. If I set the table fields on MSSQL to allow NULLS ,
with
default values , the update goes through , however all non updated fields
are set to NULL , completely ignoring the table definitions default values
!.

I have tried to change marshall options to mrALL with no effect.

I am using the OLEDB provider for MSSQL , CBuilder 5 , Adonis Dataset

Puuuhhhlease could some one help me with this ?

Regards

Robi Kihm
Technical Details
Message-ID: <3ce7b2a9_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,91a05a39a1e8ee58,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-05-19 07:15:38 PST
Reply-To: "Robi Kihm" <robi_kihm@yebo.co.za>
From: "Robi Kihm" <robi_kihm@yebo.co.za>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Default values on insert MSSQL7
Date: Sun, 19 May 2002 16:13:13 +0200
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 155.239.64.104
Message-ID: <3ce7b2a9_2@dnews>
X-Trace: dnews 1021817513 155.239.64.104 (19 May 2002 07:11:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews