🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #103

Object cannot be cast from type DBNull to other types

#103
From: Brigitte Spatz
Date: Thu, 03 Aug 2006 16:08
14 lines
1645 bytes
I have three checkboxes on my form, all of which are bound to columns of  
type bit in an SQL Server DB like:
     chbODMPurpose.DataBindings.Add('Checked', dv, 'fld_Purpose'); //dv is  
a dataview
Things are fine with one of these checkboxes, however, when I try to  
display the tab pages where one of the other two are contained, I get  
"Object cannot be cast from type DBNull to other types". If I disable the  
above line where databinding is executed I can display the tab page, so  
there's clearly something missing/wrong in either my databinding or my  
table. Just where and what???

TIA.

Brigitte
Technical Details
Message-ID: <op.tdpts8e1sr6zr4@acer>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,85a087bab5fb1497,start
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 03 Aug 2006 18:08:58 +0200
Subject: Object cannot be cast from type DBNull to other types
From: "Brigitte Spatz" <brigitte.spatz@gmx.net>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
MIME-Version: 1.0
Newsgroups: borland.public.delphi.database.dotnet
Content-Transfer-Encoding: 7bit
Message-ID: <op.tdpts8e1sr6zr4@acer>
User-Agent: Opera Mail/9.00 (Win32)
X-Antivirus: avast! (VPS 0631-2, 02/08/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 217.189.168.53
X-Trace: newsgroups.borland.com 1154621348 217.189.168.53 (3 Aug 2006 09:09:08 -0700)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail