table names in ms sql server 2005

The table name in MS SQL server 2005 is g_Users.
In ASP I have used the table name g_users.
In sql 2000, this didn't give any error.
when i transferred it to sql 2005 the code is now giving errors for table names.
'invalid object name'.
its completely coded so cannot change the code now.
Any other way around ?
Desire2changeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chapmandewCommented:
g_Users is a valid name in SQL Server 2005...are you sure that the table is there and in the correct database?
0
dportasCommented:
Are you referencing the correct database?
If so, are you referencing the schema name for your objects? Read the following article about the differences between owner and schema in 2005 compared to 2000:
http://msdn2.microsoft.com/en-us/library/ms190387.aspx
0
Aneesh RetnakaranDatabase AdministratorCommented:
i think the issue is with the Schema / ownership of  the object

Just prefix the owner/schema name to the table
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Aneesh RetnakaranDatabase AdministratorCommented:
something like

 select * from schemaName.TableName
0
brejkCommented:
On your SQL Server 2005 instance do the following:

use YourDatabaseName -- replace the name with your database name
go

select quotename(schema_name([schema_id])) + '.' + quotename([name]) as [Table name]
from sys.objects
where [name] = N'g_Users'

Then you will know what's your schema and table names are (and you will also find out if the g_Users table exists in your database). Then just copy the result of the above query to your ad-hoc queries and it should work. You should always use two-part names (schema.object) as a best practice.
0
Desire2changeAuthor Commented:
but when i change g_users to g_Users it is coming right. am getting the same error for column names also
'invalid column name 'PassWord'  the password field name is 'Password'.
Do i have to change all , is sql server 2005 case sensitive for table names and column names.

0
brejkCommented:
Maybe you have server and/or database collation set to case sensitive. Execute this:

SELECT SERVERPROPERTY('Collation')
SELECT DATABASEPROPERTYEX('YourDatabaseName','Collation')

and check if there is "CS" ("case sensitive") in server and/or database collation name. If so use g_Users as the table name or change the database (and/or server) collation. For your comfort I would suggest the second option (have server and database case insensitive or you can have more problems coming up). But you must know that collation change is not a trivial process...

PS. How did you perform the transfer to SQL Server 2005?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Desire2changeAuthor Commented:
Thanks for the response.
I used DTS for transfer, it is in c:\program files\ms sql server\90\DTS\Binn
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.