What is the significance of a field named like this [size]

D

Dale

in and SQL Server table? ... I have a table that I'm trying to run some
queries on using ADO and when I have a SELECT with the field name called
size without square brackets, my VB program craps out on me. I got
stuck on this for a while until I looked at the table in SQL Server and
noticed 2 fields with square brackets include this size one. I checked
and didn't find size to be a reserved word. Thanks.
 
J

Jeff Boyce

Dale

If you change the fieldname to "PantsSize" or "AsteroidSize" or "xSize", do
you still have the problem?
 
B

Brendan Reynolds

"size" is a SQL-92 and ODBC reserved keyword. See the topic "Reserved
Keywords" in SQL Server Books Online.
 
D

Dale

Thanks for the responses guys.

Brendan, I just did a deeper search and see that it's and ODBC reserved
- that's probably how I missed it during my initial searches.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top