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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining the Connect string for SQL Server linked tables

Status
Not open for further replies.

closesupport

IS-IT--Management
Jun 16, 2003
15
0
0
GB
I want to be able to distribute an .mde application with the option to link into SQL Server tables. Is there a way to programmatically define the Entries in MSysObjects.Connect and MSysObjects.Name so that I can deal with various SQL Server and ODBC setups?

One problem I have encountered is that linked tables do not always come across from SQL Server with the dbo prefix. It depends on the user(s) that are in the db_owner role.

I need to be able to deal with these differences and I thought that one way to do this would be to allow end users to define the connection string on the basis of their own setup.

Any ideas?

Hanging on your every thread

Pete
 
Pete,

I would strongly advise you not to make changes to the MSysObjects table. There is just too much opportunity for corruption when you don't know the exact nature of it's use. One application I have developed using TableDef objects looks at the TableDef Connection property to determine where they are connected. If the table is not found I pop up a wizard that allows the user to browse to the correct file and link to it. I'm using links to a Jet database and I'm unsure if the links contain the connection property when linked to a SQL Server database.


---------------------
scking@arinc.com
---------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top