ADO Recordset field name problem

Ryo2
12-15-2000, 05:33 PM
My problem is ADO couldn't find the object in the collection..
easiest way to explain it is a example:

I have a database table with a Field Name "Serial No"

Okay.. I do the adoConnection to the database,
and the recordset (adoRS_SerialNo) is opened to the table.

Now I want to get the value form this field..
Normally it would be like
adoRS_SerialNo!{Field Name}

My problem is how do I put a field name of "Serial No" into it.

ie adoRS_SerialNo!Serial No <===== ERROR

Thanks for the help.

d.paulson
12-16-2000, 09:27 AM
Any time you have a field name with a space in it you need to surround this name with square brackets
adoRS_SerialNo![Serial No]


d. paulson

whelanp
12-18-2000, 09:42 AM
There should never be any circumstances where a proper database system has fields with spaces in them.

Its a bad habit and not worth the hassle.

Change in now to SerialNo.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum