On Wed, 9 Feb 2005 14:33:00 -0600, mp wrote:
How do i cast a string from sql to a long? lDocumentVersion is long,
oSqlDR.GetValue(0) returns a string.
lDocumentVersion =oSqlDR.GetValue(0);
You can't cast it but you can convert it. Use Convert.ToInt64(string)
overload. Check for null first if that is a possible value. Or if you
want more control, use one of the overloads of Int64.Parse.
--
Tom Porterfield