I have a single SQL Server 2000 database. I added some code to my website pages today to redirect people from certain IP addresses. The IP list is in the database in a table called tbl_IP_list. When I try and use the code, I get the following error on the ASP pages:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'tbl_IP_List'.
The table is definitely there, but oddly it has a different owner listed. All the others have 'dbo' as the owner and this one has 'db_owner'.
I have run 'exec sp_tables' in Query Analyzer which lists the table fine; but if I try and access the contents via Query Analyzer it gives me a similar error:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'tbl_IP_list'.
I can access the table directly in Enterprise Manager with no problems at all - I've added and edited rows.
Is this a database owner issue? And if so, how can I change the database owner? I have tried 'exec sp_changeobjectowner 'tbl_IP_list', 'dbo'' in Query Analyzer but it doesn't seem to do anything.