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

Linking SQL Server database to Access

Status
Not open for further replies.

L0stAngel

Programmer
May 5, 2005
58
US
Hello, I have a rather large MSSQL Server database. I have to make an access program that makes use of 4 of the tables in the MSSQL database. Each table has 6 fields in them. How can I make a relationship so I can use the information from each of the 4 tables, and put it in access?
 
Sorry, I didnt see an edit button, but I am using MSSQL Server 2k, and Access 97.

So far, I have clicked 'new', 'Link Table', picked ODBC, clicked the Machine Data Source tab, and selected my SQL DB. I selected my 4 tables, Clicked OK, it adds the tables into my Access Tables, and the info is imported. Now what do I do if I want to get data from each of these tables freely in my form/report?
 
You don't need relationships to join tables. Just bring the relevant tables into the QBE screen and manually draw the joins between the join fields, as part of creating your desired query. Of course you can alternatively write SQL in the SQL view.

 
Thanks for your reply, with me connecting to the SQL Server DB through the ODBC connection, I get live data correct? Or does it just copy the data that WAS there when I made the link?
 
You get live data. When you run your query, Access translates the SQL Server data requests into ODBC calls (somewhat similar to SQL) which are then passed to the target database to run a query. Access then merges that data with what it has retrieved from other sources eg your Jet database.

 
Thank you very much, I found out the query I needed to get data from each table, and just base my forms connection off of the query. Now if only I can find out how to decypher the timestamps..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top