Robert L. Stewart
robert at webedb.com
Fri Nov 30 14:22:16 CST 2007
John, Use [] around the name and you can use special characters. Robert At 01:13 PM 11/30/2007, you wrote: >Date: Fri, 30 Nov 2007 14:04:15 -0500 >From: "jwcolby" <jwcolby at colbyconsulting.com> >Subject: [dba-VB] Weird table name restriction >To: <dba-sqlserver at databaseadvisors.com>, > <dba-vb at databaseadvisors.com> >Message-ID: <002501c83383$cde18360$647aa8c0 at M90> >Content-Type: text/plain; charset="US-ASCII" > >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