[dba-VB] Weird table name restriction

jwcolby jwcolby at colbyconsulting.com
Fri Nov 30 13:04:15 CST 2007


I just discovered that SQL Server (or VB.Net) does not like dashes in table
names.

If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an
error "can't access destination table" but if I remove the dash "ZIP4AA_X"
it works just fine.

The problem is that I take the name of the datafile, strip off the extension
and use that as my table name.  Thus I now have to start doing edits of the
file name before I can use it as a field name.

The hoops we have to jump through...

John W. Colby
Colby Consulting
www.ColbyConsulting.com 




More information about the dba-VB mailing list