[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Should you keep dbo_ names?

Posted on 2011-05-05
Medium Priority
Last Modified: 2012-05-11
I had an Access database backend, that I converted to SQL Server backend.  Then I imported links to SQL database, all the tables now have "dbo_" added to their name... so when I try to run my forms none of them can find their recordsource.

Example form that had recordsource totblPeople now can't find the table because the link is named "dbo_tblPeople".  

Should I go into all my forms and rename the recordsources to match the new names or is there a better way around this?
Question by:gcgcit
  • 3
LVL 49

Expert Comment

by:Dale Fye
ID: 35699823
I wouldn't recommend it.  I would change the local name of the linked tables.  If you right click on the table name, you should get a Rename option in the popup menu.  Select that and then just delete the "dbo_" portion of the table name.  This will not damage the link.
LVL 49

Accepted Solution

Dale Fye earned 2000 total points
ID: 35699863
If you have code that relinks tables for you, then you should set it up so that it creates the local table with the name you want it to use.

Another way to do this, if you have a lot of tables is to write a quick subroutine:

Public Sub DropTablePrefix()

    Dim db as dao.database
    Dim tdf as dao.tabledef

    set db = currentdb
    for each tdf in db.tabledefs

        if instr(tdf.name, "dbo_") = 1 then
            tdf.Name = mid(tdf.name, 5)
        end if


End Sub
LVL 49

Expert Comment

by:Dale Fye
ID: 35699865
Make a backup before you do this!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question