Sorry... Didn't read the guid part I think there is a GetGUID value and
then you should check DataReader.IsDBNull for the field that can be
null...

scott

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Scott Densmore
Sent: Wednesday, May 01, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] question about sql to c# datatypes


Boolean and String respectively.
DataReader.GetBoolean([column_name_bit]),
DataReader.GetString([column_name_var_char]);

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Jeff Mangan
Sent: Wednesday, May 01, 2002 4:37 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] question about sql to c# datatypes


I have a datareader and for each row, I am passing two of the column
values to a c# function in my code behind.  They are a bit and
varchar(50). My c# function will only work if I make the parameters as
objects ie. MyFunc (object value1, object value2).  I don't want to do
it this way due to many reasons, overhead for one.  What are the proper
datatypes for a varchar(50) and a bit from sql server?  do I need to
cast them down to another value or what?? This bit could also be null,
and the varchar(50) is a guid.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to