[dba-SQLServer] Converting the value in a field

Doris Manning mikedorism at verizon.net
Mon Dec 3 07:11:36 CST 2007


Wrapping the object in CInt() should fix the problem.

Doris Manning
Database Administrator
Hargrove Inc.

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Saturday, December 01, 2007 12:04 PM
To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] Converting the value in a field

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 

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com






More information about the dba-SQLServer mailing list