December 5, 2003 at 3:39 pm
Help! I have two Access databases that I converted to SQL Server. One database is a new one that I created...one is an old one created by someone who's long gone.
I need to replicate portions of each of these databases out to a web host's SQL Server for our web site. I set up the Publisher and Subscriber for my database and it works great. The problem: the old database has spaces in table names and field names (again, I didn't do it!). When I use the Create Publisher Wizard in Enterprise Manager with the old database it throws a whole bunch of errors when it's trying to configure the Articles. The last line of the stream of errors is, "incorrect syntax near the word 'ID'".
Of course I've seen this error before...mainly when I'm writing SQL that references field or table names with spaces in them (like 'Student ID') and I forget to put brackets around it! I'm thinking that one of the SProcs used by the wizard doesn't bracket the field names and table names and it's causing the whole darn procedure to parse incorrectly.
Does anybody know of a way around this without manually coding all the SQL-DMO code to set up the Publisher? I'm running SQL Server 2000 Sp3a. Thanks!
Edited by - softnerd on 12/05/2003 3:39:41 PM
December 6, 2003 at 7:00 am
One way would be rename the table, fix the column names, then create a view on that table that aliases the fixed column names back to the original. All your apps still work, repl works, you're a step closer to having it fixed if you tell developers to code against the table instead of the view.
Andy
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply