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 ?
Who is Participating?
brejkConnect With a Mentor Commented:
Maybe you have server and/or database collation set to case sensitive. Execute this:

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?
g_Users is a valid name in SQL Server 2005...are you sure that the table is there and in the correct database?
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:
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Aneesh RetnakaranDatabase AdministratorCommented:
i think the issue is with the Schema / ownership of  the object

Just prefix the owner/schema name to the table
Aneesh RetnakaranDatabase AdministratorCommented:
something like

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

use YourDatabaseName -- replace the name with your database name

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.
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.

Desire2changeAuthor Commented:
Thanks for the response.
I used DTS for transfer, it is in c:\program files\ms sql server\90\DTS\Binn
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.