The datareader has many many functions for retrieving field values, such as GetInt32, GetGuid, etc.. You should look at all of those, to see which ones are more appropriate for the data types you have, and define MyFunc appropriately.
On Wed, 1 May 2002 14:36:42 -0700, Jeff Mangan <[EMAIL PROTECTED]> wrote: >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.