.NETGURU
Nulls
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdata' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Carlos Magalhaes
-- Moved from [aspngfreeforall] to [aspngdata] by Dana Coffey <Click here to reveal e-mail address> --

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>Nulls</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi all,</FONT>
</P>

<P><FONT SIZE=3D2>If I want to insert a null to the db on a insert or =
update sql statement then do I a just leave the string open ( I don't =
think this is the same as nulls) or B: do I state if my value is equal =
to a certain value then change it to "Null" would that mean =
the same as a NULL in the db?</FONT></P>

<P><FONT SIZE=3D2>Thanks</FONT>
</P>

<P><FONT SIZE=3D2>Carlos</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
    
Scott Watermasysk (VIP)
Carlos,

A null string is not the same as a null value in your db.

To add a null value to your db you should insert System.DBNull.Value.

HTH,
Scott

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Monday, May 06, 2002 5:30 AM
To: aspngdata
Subject: [aspngdata] Nulls

-- Moved from [aspngfreeforall] to [aspngdata] by Dana Coffey
<Click here to reveal e-mail address> --

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server
version = 5.5.2652.35"> <TITLE>Nulls</TITLE> </HEAD> <BODY>

<P><FONT SIZE=3D2>Hi all,</FONT>
</P>

<P><FONT SIZE=3D2>If I want to insert a null to the db on a insert or =
update sql statement then do I a just leave the string open ( I don't =
think this is the same as nulls) or B: do I state if my value is equal = to
a certain value then change it to "Null" would that mean = the
same as a NULL in the db?</FONT></P>

<P><FONT SIZE=3D2>Thanks</FONT>
</P>

<P><FONT SIZE=3D2>Carlos</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Jason Lefebvre
Carlos,

You should be able to use something like this to insert a null into your
database from a SQL query:

INSERT INTO MyTable
(
field1,
field2,
field3
)
VALUES
(
'value1',
'value2',
NULL
)

Hope this helps,
Jason

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Monday, May 06, 2002 5:30 AM
To: aspngdata
Subject: [aspngdata] Nulls

-- Moved from [aspngfreeforall] to [aspngdata] by Dana Coffey
<Click here to reveal e-mail address> --

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>Nulls</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi all,</FONT>
</P>

<P><FONT SIZE=3D2>If I want to insert a null to the db on a insert or =
update sql statement then do I a just leave the string open ( I don't =
think this is the same as nulls) or B: do I state if my value is equal =
to a certain value then change it to "Null" would that mean =
the same as a NULL in the db?</FONT></P>

<P><FONT SIZE=3D2>Thanks</FONT>
</P>

<P><FONT SIZE=3D2>Carlos</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Carlos Magalhaes
How can one check for nulls in a dataset ( it will always be a dataset with
one column and one row) and if there is a null then exit sub else carry on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
 
    
Jaime Noriega
How can one check for nulls in a dataset ( it will always be a dataset
with
one column and one row) and if there is a null then exit sub else carry
on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
 
    
Bob Levittan (VIP)
How can one check for nulls in a dataset ( it will always be a dataset with
one column and one row) and if there is a null then exit sub else carry on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
 
    
Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: [aspngdata] RE: Nulls</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Ok I tried with my example and failed very horribly =
here is my setup.</FONT>
</P>

<P><FONT SIZE=3D2>Dim dsRes As New DataSet()</FONT>
<BR><FONT SIZE=3D2>Notecmd.Fill(dsRes, "Res")</FONT>
</P>

<P><FONT SIZE=3D2>Then I tried</FONT>
</P>

<P><FONT SIZE=3D2>   If Not =
IsDBNull(dsRes.Tables("Res")) Then</FONT>
<BR><FONT SIZE=3D2>    ResolTxt.Text =3D =
dsRes.Tables("Res").DefaultView(0).Item("Note")</FON=
T>
</P>

<P><FONT =
SIZE=3D2>          &nb=
sp; Else</FONT>
<BR><FONT =
SIZE=3D2>          &nb=
sp;     ResolTxt.Text =3D "No Resolution Was =
Entered"</FONT>
<BR><FONT =
SIZE=3D2>          &nb=
sp; </FONT>
<BR><FONT SIZE=3D2>        End =
If</FONT>
</P>

<P><FONT SIZE=3D2>Why ?</FONT>
</P>

<P><FONT SIZE=3D2>And here is the error I received :</FONT>
</P>

<P><FONT SIZE=3D2>Cast from type 'DBNull' to type 'String' is not =
valid</FONT>
</P>

<P><FONT SIZE=3D2>Thank you All</FONT>
<BR><FONT SIZE=3D2>Carlos</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Jaime Noriega [<A =
HREF=3D"mailto:Click here to reveal e-mail address">mailto:jaime.noriega@entra=
datech.com</A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, May 30, 2002 4:35 PM</FONT>
<BR><FONT SIZE=3D2>To: aspngdata</FONT>
<BR><FONT SIZE=3D2>Subject: [aspngdata] RE: Nulls</FONT>
</P>

<P><FONT SIZE=3D2>If Not IsDBNull(olRow.Item("required")) =
Then</FONT>
<BR><FONT SIZE=3D2>      If =
olRow.Item("required") Then</FONT>
<BR><FONT =
SIZE=3D2>           =
.BackColor =3D System.Drawing.Color.Aqua</FONT>
<BR><FONT SIZE=3D2>      End If</FONT>
<BR><FONT SIZE=3D2>End If</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Jaime Noriega</FONT>
<BR><FONT SIZE=3D2>R & D Manager</FONT>
<BR><FONT SIZE=3D2>Entrada Technologies LTD</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.entradatech.com"" target="_blank">http://www.entradatech.com"; =
TARGET=3D"_blank">http://www.entradatech.com</A></FONT>
</P>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Carlos Magalhaes [<A =
HREF=3D"mailto:Click here to reveal e-mail address">mailto:Click here to reveal e-mail address</A>] =
</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, May 30, 2002 10:23 AM</FONT>
<BR><FONT SIZE=3D2>To: aspngdata</FONT>
<BR><FONT SIZE=3D2>Subject: [aspngdata] Nulls</FONT>
</P>

<P><FONT SIZE=3D2>-- Moved from [aspngfreeforall] to [aspngdata] =
by</FONT>
<BR><FONT SIZE=3D2>Click here to reveal e-mail address =
<Click here to reveal e-mail address> --</FONT>
</P>

<P><FONT SIZE=3D2>This message is in MIME format. Since your mail =
reader does not</FONT>
<BR><FONT SIZE=3D2>understand</FONT>
<BR><FONT SIZE=3D2>this format, some or all of this message may not be =
legible.</FONT>
</P>

<P><FONT SIZE=3D2>------_=3D_NextPart_001_01C207E5.80B3AFC0</FONT>
<BR><FONT SIZE=3D2>Content-Type: text/plain</FONT>
</P>

<P><FONT SIZE=3D2>How can one check for nulls in a dataset ( it will =
always be a dataset</FONT>
<BR><FONT SIZE=3D2>with</FONT>
<BR><FONT SIZE=3D2>one column and one row) and if there is a null then =
exit sub else carry</FONT>
<BR><FONT SIZE=3D2>on</FONT>
<BR><FONT SIZE=3D2>with the rest of my code....</FONT>
</P>

<P><FONT SIZE=3D2> </FONT>
</P>

<P><FONT SIZE=3D2> </FONT>
</P>

<P><FONT SIZE=3D2>Any ideas></FONT>
</P>

<P><FONT SIZE=3D2> </FONT>
</P>

<P><FONT SIZE=3D2>C</FONT>
</P>
<BR>
<BR>

<P><FONT =
SIZE=3D2>-------------------------------------------------------------</=
FONT>
<BR><FONT SIZE=3D2>This email and any files transmitted are</FONT>
<BR><FONT SIZE=3D2>confidential and intended solely for the</FONT>
<BR><FONT SIZE=3D2>use of the individual or entity to which</FONT>
<BR><FONT SIZE=3D2>they are addressed, whose privacy</FONT>
<BR><FONT SIZE=3D2>should be respected.  Any views or</FONT>
<BR><FONT SIZE=3D2>opinions are solely those of the author</FONT>
<BR><FONT SIZE=3D2>and do not necessarily represent those</FONT>
<BR><FONT SIZE=3D2>of the Trencor Group, or any of its</FONT>
<BR><FONT SIZE=3D2>representatives, unless specifically</FONT>
<BR><FONT SIZE=3D2>stated.  </FONT>
</P>

<P><FONT SIZE=3D2>Email transmission cannot be guaranteed</FONT>
<BR><FONT SIZE=3D2>to be secure, error free or without virus</FONT>
<BR><FONT SIZE=3D2>contamination.  The sender therefore</FONT>
<BR><FONT SIZE=3D2>accepts no liability for any errors or</FONT>
<BR><FONT SIZE=3D2>omissions in the contents of this message,</FONT>
<BR><FONT SIZE=3D2>nor for any virus infection that might result</FONT>
<BR><FONT SIZE=3D2>from opening this message.  Trencor is =
not</FONT>
<BR><FONT SIZE=3D2>responsible in the event of any third party</FONT>
<BR><FONT SIZE=3D2>interception of this email.   </FONT>
</P>

<P><FONT SIZE=3D2>If you have received this email in error please =
notify</FONT>
<BR><FONT SIZE=3D2>Click here to reveal e-mail address   For more =
information about</FONT>
<BR><FONT SIZE=3D2>Trencor, visit www.trencor.net <<A =
HREF=3D"http://www.trencor.net" =
TARGET=3D"_blank">http://www.trencor.net</A>></FONT>
</P>

<P><FONT SIZE=3D2>------_=3D_NextPart_001_01C207E5.80B3AFC0</FONT>
<BR><FONT SIZE=3D2>Content-Type: text/html</FONT>
</P>

<P><FONT SIZE=3D2><html></FONT>
</P>

<P><FONT SIZE=3D2><head></FONT>
<BR><FONT SIZE=3D2><META HTTP-EQUIV=3D"Content-Type" =
CONTENT=3D"text/html; charset=3Dus-ascii"></FONT>
</P>
<BR>

<P><FONT SIZE=3D2><meta name=3DGenerator content=3D"Microsoft =
Word 10 (filtered)"></FONT>
</P>

<P><FONT SIZE=3D2><style></FONT>
<BR><FONT SIZE=3D2><!--</FONT>
<BR><FONT SIZE=3D2> /* Style Definitions */</FONT>
<BR><FONT SIZE=3D2> p.MsoNormal, li.MsoNormal, =
div.MsoNormal</FONT>
<BR>        <FONT =
SIZE=3D2>{margin:0in;</FONT>
<BR>        <FONT =
SIZE=3D2>margin-bottom:.0001pt;</FONT>
<BR>        <FONT =
SIZE=3D2>font-size:12.0pt;</FONT>
<BR>        <FONT =
SIZE=3D2>font-family:"Times New Roman";}</FONT>
<BR><FONT SIZE=3D2>a:link, span.MsoHyperlink</FONT>
<BR>        <FONT =
SIZE=3D2>{color:blue;</FONT>
<BR>        <FONT =
SIZE=3D2>text-decoration:underline;}</FONT>
<BR><FONT SIZE=3D2>a:visited, span.MsoHyperlinkFollowed</FONT>
<BR>        <FONT =
SIZE=3D2>{color:purple;</FONT>
<BR>        <FONT =
SIZE=3D2>text-decoration:underline;}</FONT>
<BR><FONT SIZE=3D2>span.EmailStyle17</FONT>
<BR>        <FONT =
SIZE=3D2>{font-family:Arial;</FONT>
<BR>        <FONT =
SIZE=3D2>color:windowtext;}</FONT>
<BR><FONT SIZE=3D2>@page Section1</FONT>
<BR>        <FONT =
SIZE=3D2>{size:8.5in 11.0in;</FONT>
<BR>        <FONT =
SIZE=3D2>margin:1.0in 1.25in 1.0in 1.25in;}</FONT>
<BR><FONT SIZE=3D2>div.Section1</FONT>
<BR>        <FONT =
SIZE=3D2>{page:Section1;}</FONT>
<BR><FONT SIZE=3D2>--></FONT>
<BR><FONT SIZE=3D2></style></FONT>
</P>

<P><FONT SIZE=3D2></head></FONT>
</P>

<P><FONT SIZE=3D2><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple></FONT>
</P>

<P><FONT SIZE=3D2><div class=3DSection1></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT SIZE=3D2>font-family:Arial'>How can one check for nulls in =
a dataset ( it will</FONT>
<BR><FONT SIZE=3D2>always be</FONT>
<BR><FONT SIZE=3D2>a dataset with one column and one row) and if there =
is a null then exit</FONT>
<BR><FONT SIZE=3D2>sub</FONT>
<BR><FONT SIZE=3D2>else carry on with the rest of my =
code....</span></font></p></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT =
SIZE=3D2>font-family:Arial'>&nbsp;</span></font></=
p></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT =
SIZE=3D2>font-family:Arial'>&nbsp;</span></font></=
p></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT SIZE=3D2>font-family:Arial'>Any =
ideas&gt;</span></font></p></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT =
SIZE=3D2>font-family:Arial'>&nbsp;</span></font></=
p></FONT>
</P>

<P><FONT SIZE=3D2><p class=3DMsoNormal><font size=3D2 =
face=3DArial><span</FONT>
<BR><FONT SIZE=3D2>style=3D'font-size:10.0pt;</FONT>
<BR><FONT =
SIZE=3D2>font-family:Arial'>C</span></font></p></FO=
NT>
</P>

<P><FONT SIZE=3D2></div></FONT>
</P>

<P><FONT SIZE=3D2>| [aspngdata] member Click here to reveal e-mail address =
=3D YOUR ID<BR></FONT>
<BR><FONT SIZE=3D2>| <A =
HREF=3D"http://www.asplists.com/asplists/aspngdata.asp" =
TARGET=3D"_blank">http://www.asplists.com/asplists/aspngdata.asp</A> =
=3D JOIN/QUIT<BR></FONT>
<BR><FONT SIZE=3D2>| <A HREF=3D"http://www.asplists.com/search" =
TARGET=3D"_blank">http://www.asplists.com/search</A> =3D SEARCH =
Archives<BR></FONT>
</P>
<BR>

<P><FONT SIZE=3D2>| [aspngdata] member Click here to reveal e-mail address =3D YOUR =
ID<BR></FONT>
<BR><FONT SIZE=3D2>| <A =
HREF=3D"http://www.asplists.com/asplists/aspngdata.asp" =
TARGET=3D"_blank">http://www.asplists.com/asplists/aspngdata.asp</A> =
=3D JOIN/QUIT<BR></FONT>
<BR><FONT SIZE=3D2>| <A HREF=3D"http://www.asplists.com/search" =
TARGET=3D"_blank">http://www.asplists.com/search</A> =3D SEARCH =
Archives<BR></FONT>
</P>

<P><FONT SIZE=3D2></BODY></FONT>
</P>

<P><FONT SIZE=3D2></html></FONT>
</P>

<P><FONT SIZE=3D2>------_=3D_NextPart_001_01C207E5.80B3AFC0--</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
    
Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2652.35">
<TITLE>RE: [aspngdata] RE: Nulls</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Can you explain what this is trying to do ?</FONT>
</P>

<P><FONT SIZE=2>Thanks </FONT>
</P>

<P><FONT SIZE=2>Carlos</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Jaime Noriega [<A HREF="mailto:Click here to reveal e-mail address">mailto:Click here to reveal e-mail address</A>] </FONT>
<BR><FONT SIZE=2>Sent: Thursday, May 30, 2002 4:35 PM</FONT>
<BR><FONT SIZE=2>To: aspngdata</FONT>
<BR><FONT SIZE=2>Subject: [aspngdata] RE: Nulls</FONT>
</P>

<P><FONT SIZE=2>If Not IsDBNull(olRow.Item("required")) Then</FONT>
<BR><FONT SIZE=2>      If olRow.Item("required") Then</FONT>
<BR><FONT SIZE=2>           .BackColor = System.Drawing.Color.Aqua</FONT>
<BR><FONT SIZE=2>      End If</FONT>
<BR><FONT SIZE=2>End If</FONT>
</P>
<BR>

<P><FONT SIZE=2>Jaime Noriega</FONT>
<BR><FONT SIZE=2>R & D Manager</FONT>
<BR><FONT SIZE=2>Entrada Technologies LTD</FONT>
<BR><FONT SIZE=2><A HREF="http://www.entradatech.com"" target="_blank">http://www.entradatech.com"; TARGET="_blank">http://www.entradatech.com</A></FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Carlos Magalhaes [<A HREF="mailto:Click here to reveal e-mail address">mailto:Click here to reveal e-mail address</A>] </FONT>
<BR><FONT SIZE=2>Sent: Thursday, May 30, 2002 10:23 AM</FONT>
<BR><FONT SIZE=2>To: aspngdata</FONT>
<BR><FONT SIZE=2>Subject: [aspngdata] Nulls</FONT>
</P>

<P><FONT SIZE=2>-- Moved from [aspngfreeforall] to [aspngdata] by</FONT>
<BR><FONT SIZE=2>Click here to reveal e-mail address <Click here to reveal e-mail address> --</FONT>
</P>

<P><FONT SIZE=2>This message is in MIME format. Since your mail reader does not</FONT>
<BR><FONT SIZE=2>understand</FONT>
<BR><FONT SIZE=2>this format, some or all of this message may not be legible.</FONT>
</P>

<P><FONT SIZE=2>------_=_NextPart_001_01C207E5.80B3AFC0</FONT>
<BR><FONT SIZE=2>Content-Type: text/plain</FONT>
</P>

<P><FONT SIZE=2>How can one check for nulls in a dataset ( it will always be a dataset</FONT>
<BR><FONT SIZE=2>with</FONT>
<BR><FONT SIZE=2>one column and one row) and if there is a null then exit sub else carry</FONT>
<BR><FONT SIZE=2>on</FONT>
<BR><FONT SIZE=2>with the rest of my code....</FONT>
</P>

<P><FONT SIZE=2> </FONT>
</P>

<P><FONT SIZE=2> </FONT>
</P>

<P><FONT SIZE=2>Any ideas></FONT>
</P>

<P><FONT SIZE=2> </FONT>
</P>

<P><FONT SIZE=2>C</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>-------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>This email and any files transmitted are</FONT>
<BR><FONT SIZE=2>confidential and intended solely for the</FONT>
<BR><FONT SIZE=2>use of the individual or entity to which</FONT>
<BR><FONT SIZE=2>they are addressed, whose privacy</FONT>
<BR><FONT SIZE=2>should be respected.  Any views or</FONT>
<BR><FONT SIZE=2>opinions are solely those of the author</FONT>
<BR><FONT SIZE=2>and do not necessarily represent those</FONT>
<BR><FONT SIZE=2>of the Trencor Group, or any of its</FONT>
<BR><FONT SIZE=2>representatives, unless specifically</FONT>
<BR><FONT SIZE=2>stated.  </FONT>
</P>

<P><FONT SIZE=2>Email transmission cannot be guaranteed</FONT>
<BR><FONT SIZE=2>to be secure, error free or without virus</FONT>
<BR><FONT SIZE=2>contamination.  The sender therefore</FONT>
<BR><FONT SIZE=2>accepts no liability for any errors or</FONT>
<BR><FONT SIZE=2>omissions in the contents of this message,</FONT>
<BR><FONT SIZE=2>nor for any virus infection that might result</FONT>
<BR><FONT SIZE=2>from opening this message.  Trencor is not</FONT>
<BR><FONT SIZE=2>responsible in the event of any third party</FONT>
<BR><FONT SIZE=2>interception of this email.   </FONT>
</P>

<P><FONT SIZE=2>If you have received this email in error please notify</FONT>
<BR><FONT SIZE=2>Click here to reveal e-mail address   For more information about</FONT>
<BR><FONT SIZE=2>Trencor, visit www.trencor.net <<A HREF="http://www.trencor.net" TARGET="_blank">http://www.trencor.net</A>></FONT>
</P>

<P><FONT SIZE=2>------_=_NextPart_001_01C207E5.80B3AFC0</FONT>
<BR><FONT SIZE=2>Content-Type: text/html</FONT>
</P>

<P><FONT SIZE=2><html></FONT>
</P>

<P><FONT SIZE=2><head></FONT>
<BR><FONT SIZE=2><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"></FONT>
</P>
<BR>

<P><FONT SIZE=2><meta name=Generator content="Microsoft Word 10 (filtered)"></FONT>
</P>

<P><FONT SIZE=2><style></FONT>
<BR><FONT SIZE=2><!--</FONT>
<BR><FONT SIZE=2> /* Style Definitions */</FONT>
<BR><FONT SIZE=2> p.MsoNormal, li.MsoNormal, div.MsoNormal</FONT>
<BR>        <FONT SIZE=2>{margin:0in;</FONT>
<BR>        <FONT SIZE=2>margin-bottom:.0001pt;</FONT>
<BR>        <FONT SIZE=2>font-size:12.0pt;</FONT>
<BR>        <FONT SIZE=2>font-family:"Times New Roman";}</FONT>
<BR><FONT SIZE=2>a:link, span.MsoHyperlink</FONT>
<BR>        <FONT SIZE=2>{color:blue;</FONT>
<BR>        <FONT SIZE=2>text-decoration:underline;}</FONT>
<BR><FONT SIZE=2>a:visited, span.MsoHyperlinkFollowed</FONT>
<BR>        <FONT SIZE=2>{color:purple;</FONT>
<BR>        <FONT SIZE=2>text-decoration:underline;}</FONT>
<BR><FONT SIZE=2>span.EmailStyle17</FONT>
<BR>        <FONT SIZE=2>{font-family:Arial;</FONT>
<BR>        <FONT SIZE=2>color:windowtext;}</FONT>
<BR><FONT SIZE=2>@page Section1</FONT>
<BR>        <FONT SIZE=2>{size:8.5in 11.0in;</FONT>
<BR>        <FONT SIZE=2>margin:1.0in 1.25in 1.0in 1.25in;}</FONT>
<BR><FONT SIZE=2>div.Section1</FONT>
<BR>        <FONT SIZE=2>{page:Section1;}</FONT>
<BR><FONT SIZE=2>--></FONT>
<BR><FONT SIZE=2></style></FONT>
</P>

<P><FONT SIZE=2></head></FONT>
</P>

<P><FONT SIZE=2><body lang=EN-US link=blue vlink=purple></FONT>
</P>

<P><FONT SIZE=2><div class=Section1></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>How can one check for nulls in a dataset ( it will</FONT>
<BR><FONT SIZE=2>always be</FONT>
<BR><FONT SIZE=2>a dataset with one column and one row) and if there is a null then exit</FONT>
<BR><FONT SIZE=2>sub</FONT>
<BR><FONT SIZE=2>else carry on with the rest of my code....</span></font></p></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>&nbsp;</span></font></p></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>&nbsp;</span></font></p></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>Any ideas&gt;</span></font></p></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>&nbsp;</span></font></p></FONT>
</P>

<P><FONT SIZE=2><p class=MsoNormal><font size=2 face=Arial><span</FONT>
<BR><FONT SIZE=2>style='font-size:10.0pt;</FONT>
<BR><FONT SIZE=2>font-family:Arial'>C</span></font></p></FONT>
</P>

<P><FONT SIZE=2></div></FONT>
</P>

<P><FONT SIZE=2>| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR></FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.asplists.com/asplists/aspngdata.asp" TARGET="_blank">http://www.asplists.com/asplists/aspngdata.asp</A> = JOIN/QUIT<BR></FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.asplists.com/search" TARGET="_blank">http://www.asplists.com/search</A> = SEARCH Archives<BR></FONT>
</P>
<BR>

<P><FONT SIZE=2>| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR></FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.asplists.com/asplists/aspngdata.asp" TARGET="_blank">http://www.asplists.com/asplists/aspngdata.asp</A> = JOIN/QUIT<BR></FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.asplists.com/search" TARGET="_blank">http://www.asplists.com/search</A> = SEARCH Archives<BR></FONT>
</P>

<P><FONT SIZE=2></BODY></FONT>
</P>

<P><FONT SIZE=2></html></FONT>
</P>

<P><FONT SIZE=2>------_=_NextPart_001_01C207E5.80B3AFC0--</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
    
Darren Patterson
I have done this and it seems to handle null values from the database
just fine.

Dim lstrTempVar as String

If dtrTask("SomeField") Is System.DBNull.Value Then

lstrTempVar = ""

Else

lstrTempVar = dtrTask("SomeField")

End If

Use the lstrTempVar for use later in your code.

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 2:18 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

Can you explain what this is trying to do ?

Thanks

Carlos

-----Original Message-----
From: Jaime Noriega [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 4:35 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

If Not IsDBNull(olRow.Item("required")) Then
If olRow.Item("required") Then
.BackColor = System.Drawing.Color.Aqua
End If
End If

Jaime Noriega
R & D Manager
Entrada Technologies LTD
http://www.entradatech.com

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 10:23 AM
To: aspngdata
Subject: [aspngdata] Nulls

-- Moved from [aspngfreeforall] to [aspngdata] by
Click here to reveal e-mail address <Click here to reveal e-mail address> --

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/plain

How can one check for nulls in a dataset ( it will always be a dataset
with
one column and one row) and if there is a null then exit sub else carry
on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/html

<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">

<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>How can one check for nulls in a dataset ( it will
always be
a dataset with one column and one row) and if there is a null then exit
sub
else carry on with the rest of my code....</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>Any ideas></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>C</span></font></p>

</div>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT<BR>
| http://www.asplists.com/search = SEARCH Archives<BR>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT<BR>
| http://www.asplists.com/search = SEARCH Archives<BR>

</BODY>

</html>

------_=_NextPart_001_01C207E5.80B3AFC0--

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address For more information about Trencor, visit
www.trencor.net
Reply to this message...
 
    
Carlos Magalhaes
How can you use this with a dataset .

Typecmd.Fill(dstype, "TypeWo")

?>

-----Original Message-----
From: Darren Patterson [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 8:55 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

I have done this and it seems to handle null values from the database just
fine.

Dim lstrTempVar as String

If dtrTask("SomeField") Is System.DBNull.Value Then

lstrTempVar = ""

Else

lstrTempVar = dtrTask("SomeField")

End If

Use the lstrTempVar for use later in your code.

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 2:18 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

Can you explain what this is trying to do ?

Thanks

Carlos

-----Original Message-----
From: Jaime Noriega [mailto:Click here to reveal e-mail address
<mailto:Click here to reveal e-mail address> ]
Sent: Thursday, May 30, 2002 4:35 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

If Not IsDBNull(olRow.Item("required")) Then
If olRow.Item("required") Then
.BackColor = System.Drawing.Color.Aqua
End If
End If

Jaime Noriega
R & D Manager
Entrada Technologies LTD
http://www.entradatech.com <http://www.entradatech.com>

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address
<mailto:Click here to reveal e-mail address> ]
Sent: Thursday, May 30, 2002 10:23 AM
To: aspngdata
Subject: [aspngdata] Nulls

-- Moved from [aspngfreeforall] to [aspngdata] by
Click here to reveal e-mail address <Click here to reveal e-mail address> --

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/plain

How can one check for nulls in a dataset ( it will always be a dataset
with
one column and one row) and if there is a null then exit sub else carry
on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net
<http://www.trencor.net> >

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/html

<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">

<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>How can one check for nulls in a dataset ( it will
always be
a dataset with one column and one row) and if there is a null then exit
sub
else carry on with the rest of my code....</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>Any ideas></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>C</span></font></p>

</div>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp
<http://www.asplists.com/asplists/aspngdata.asp> = JOIN/QUIT<BR>
| http://www.asplists.com/search <http://www.asplists.com/search> = SEARCH
Archives<BR>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp
<http://www.asplists.com/asplists/aspngdata.asp> = JOIN/QUIT<BR>
| http://www.asplists.com/search <http://www.asplists.com/search> = SEARCH
Archives<BR>

</BODY>

</html>

------_=_NextPart_001_01C207E5.80B3AFC0--

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

------------------------------------------------------------- This email and
any files transmitted are confidential and intended solely for the use of
the individual or entity to which they are addressed, whose privacy should
be respected. Any views or opinions are solely those of the author and do
not necessarily represent those of the Trencor Group, or any of its
representatives, unless specifically stated. Email transmission cannot be
guaranteed to be secure, error free or without virus contamination. The
sender therefore accepts no liability for any errors or omissions in the
contents of this message, nor for any virus infection that might result from
opening this message. Trencor is not responsible in the event of any third
party interception of this email. If you have received this email in error
please notify Click here to reveal e-mail address For more information about Trencor,
visit www.trencor.net

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
 
    
Jaime Noriega
You need to test for the value in the column

If Not IsDBNull(dsRes.Tables("Res").row(0).item("note")) Then

ResolTxt.Text dsRes.Tables("Res").DefaultView(0).Item("Note")

Else

ResolTxt.Text = "No Resolution Was Ente

End If

You had

If Not IsDBNull(dsRes.Tables("Res")) Then

Jaime Noriega

R & D Manager

Entrada Technologies LTD

http://www.entradatech.com

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 1:09 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

Ok I tried with my example and failed very horribly here is my setup.

Dim dsRes As New DataSet()
Notecmd.Fill(dsRes, "Res")

Then I tried

If Not IsDBNull(dsRes.Tables("Res")) Then
ResolTxt.Text = dsRes.Tables("Res").DefaultView(0).Item("Note")

Else
ResolTxt.Text = "No Resolution Was Entered"

End If

Why ?

And here is the error I received :

Cast from type 'DBNull' to type 'String' is not valid

Thank you All
Carlos

-----Original Message-----
From: Jaime Noriega [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 4:35 PM
To: aspngdata
Subject: [aspngdata] RE: Nulls

If Not IsDBNull(olRow.Item("required")) Then
If olRow.Item("required") Then
.BackColor = System.Drawing.Color.Aqua
End If
End If

Jaime Noriega
R & D Manager
Entrada Technologies LTD
http://www.entradatech.com

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 30, 2002 10:23 AM
To: aspngdata
Subject: [aspngdata] Nulls

-- Moved from [aspngfreeforall] to [aspngdata] by
Click here to reveal e-mail address <Click here to reveal e-mail address> --

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/plain

How can one check for nulls in a dataset ( it will always be a dataset
with
one column and one row) and if there is a null then exit sub else carry
on
with the rest of my code....

Any ideas>

C

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

------_=_NextPart_001_01C207E5.80B3AFC0
Content-Type: text/html

<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">

<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>How can one check for nulls in a dataset ( it will
always be
a dataset with one column and one row) and if there is a null then exit
sub
else carry on with the rest of my code....</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>Any ideas></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'> </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span
style='font-size:10.0pt;
font-family:Arial'>C</span></font></p>

</div>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT<BR>
| http://www.asplists.com/search = SEARCH Archives<BR>

| [aspngdata] member Click here to reveal e-mail address = YOUR ID<BR>
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT<BR>
| http://www.asplists.com/search = SEARCH Archives<BR>

</BODY>

</html>

------_=_NextPart_001_01C207E5.80B3AFC0--

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address For more information about Trencor, visit
www.trencor.net
Reply to this message...
 
    
Darren Patterson
How can one check for nulls in a dataset ( it will always be a dataset=20
with=20
one column and one row) and if there is a null then exit sub else carry=20
on=20
with the rest of my code....=20

=20

=20

Any ideas>=20

=20

C=20

=20

-------------------------------------------------------------=20
This email and any files transmitted are=20
confidential and intended solely for the=20
use of the individual or entity to which=20
they are addressed, whose privacy=20
should be respected. Any views or=20
opinions are solely those of the author=20
and do not necessarily represent those=20
of the Trencor Group, or any of its=20
representatives, unless specifically=20
stated. =20

Email transmission cannot be guaranteed=20
to be secure, error free or without virus=20
contamination. The sender therefore=20
accepts no liability for any errors or=20
omissions in the contents of this message,=20
nor for any virus infection that might result=20
from opening this message. Trencor is not=20
responsible in the event of any third party=20
interception of this email. =20

If you have received this email in error please notify=20
Click here to reveal e-mail address For more information about=20
Trencor, visit www.trencor.net <http://www.trencor.net
<http://www.trencor.net> >=20
Reply to this message...
 
 
System.Data.DataSet
System.DBNull
System.Drawing.Color




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification