[dba-VB] Weird table name restriction

Charlotte Foust cfoust at infostatsystems.com
Fri Nov 30 13:11:20 CST 2007


Yep, dashes are as bad as spaces.  ;-}

Charlotte Foust

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, November 30, 2007 11:04 AM
To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com
Subject: [dba-VB] Weird table name restriction

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 

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com





More information about the dba-VB mailing list