Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server table prefixes

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Can anyone help?

When I import SQL Server tables into Access 2000 the tables are all prefixed with dbo. i.e. dbo.<tablename>.

I notice there is a dbo user who is owner of all the SQL Server tables in question. How can I change the dbo. prefix to another of my choosing?

Thx in advance to all replies
 
The prefixes refer to ownership of the table and dbo means database owner. Really you should not worry about it as you dont necessarily need to include the prefixes in your sql.

If you really want to change the prefixes then you have to change the ownership see stored procedure sp_changeobjectowner but this will affect access rights to the table

Andy
 
You can just rename the tables in Access to remove the dbo_ prefix by right clicking on table names.

If you are importing so many tables that it this is really troublesome you can write a simple VBA program to cycle through all tables in the tabledefs collection, checking if there is an initial dbo_ and renaming to remove it.

It is generally undesirable to change the owner of a SQL table. In any event if you change the owner of a table to John then Access will import the table with a John_ prefix.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top