[dba-SQLServer] Converting the value in a field

jwcolby jwcolby at colbyconsulting.com
Sat Dec 1 11:04:04 CST 2007


I have lines of code like this:

mintNumOfRecsToExport = !EDS_FileSize

The compile complains because !EDS_FileSize is an object (a field) and
mintNumOfRecsToExport is an integer variable.  The error is:

Error	2	Option Strict On disallows implicit conversions from
'Object' to 'Integer'.	

There is no .Value property for the field object !EDS_FileSize.  Will simply
wrapping the object in CInt() fix the problem, or will I get an integer
pointer to the object?  

John W. Colby
Colby Consulting
www.ColbyConsulting.com 




More information about the dba-SQLServer mailing list