tags:

views:

120

answers:

3

Hello, My dev machine has SQL Server 2005 on it and that is how I make my DBML file and define the tables in there and then make a WCF Service. When i go to host the WCF service, the server has SQL Server 2000, it finds the connection string fine but not the table im pointing it to. Is there a way to tell through the web.config file which SQL Server i am using at run time?

Thanks

A: 

sure, that's what the connection string is for, are you sure you have the right permissions on the server?

BlackTigerX
yeah the connection string is fine, i can t ell because when i open my DataContext it opens fine, when i go to query the table it cant find it
Daniel
A: 

The name of the server and database should be in the connection string (in the config file); what does it currently look like? And what is the exact error message.

The exact connection string depends on your setup (for example, is the server a "named instance"?).

The other thing I can think of... are the objects in the right schema? i.e. are they "daniel.sometable" on your machine, but "dbo.sometable" on the server? This matters, since the dbml includes the schema. Fortunately, you can edit the dbml (it is just xml) and use "replace all" (i.e. ctrl+h) to fix this...

Marc Gravell
well in mine the table name is dbo.table, in sql server 2000 its table, but the owner is dbo...does that translate to dbo.table?
Daniel
Well im just catching the exception when i try to go to that table and returning table not found, i cant see the exact message
Daniel
get, that is the same thing... worth try. Are you sure it is looking in the right database? Have you tried a sql trace?
Marc Gravell
Im not by the remote machine so i cant trace right now, but I will when im able to log in to the remote machine
Daniel
A: 

I think its just an authentication problem, thanks all for the replies

Daniel