Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Duplicate Table Names in 2 databases problem

Author  Topic 

tektek
Starting Member

2 Posts

Posted - 2005-04-13 : 23:56:27
Hi Guys,

I have problem with asp and SQL Server 2000. I have two databases with identical table names, but separate databases. In my asp if I update 1 database with values, it also updates the table with the same name in the other database.

I have checked the asp and it is pointing to the correct database.

Is the duplicate table names causing the problems?

Thanks

Sami

Ex
Posting Yak Master

166 Posts

Posted - 2005-04-14 : 00:53:05
not sure but can you use the full database qualifer

so mydatabase.mytable instead of just mytable

e.g update mydatbase.mytable set mycol = 1 ...
Go to Top of Page

tektek
Starting Member

2 Posts

Posted - 2005-04-14 : 01:33:33
Thanks for the suggestion.

I tried it but it gives me an error for

UPDATE Maintenance.tblLangStrings Set......

Description: Invalid object name 'Maintenance.tblLangStrings'.

Any other suggestions?

Thanks

Sami
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-04-14 : 03:51:50
It's just a syntax error.
mydatabase.theowner.mytable
mydatabase.dbo.mytable
mydatabase..mytable

>> Is the duplicate table names causing the problems?
You shouldn't see this double update behavior,
unless there are triggers on the tables, or some other code doing this.
Run Profiler to see what SQL the ASP page sends to the SQL Server.

rockmoose
Go to Top of Page
   

- Advertisement -