Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150

    how to connect ms access to sql


    I am a new learned of ms access. How can I connect ms access to SQL ? do I need a SQL server so that I can connect access to SQL ?

  2. #2
    Matrix's Avatar
    Matrix is offline Admin
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2005
    Posts
    519
    If you referred to 'SQL server' by 'SQL', yes, you need a SQL server. Check out the following article: Ways to work with SQL Server data in Access.

  3. #3
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    what I mean about sql is sql tables. matrix I also viewed your link but I did not get enough information, can you give me an example how to connect to sql table using access please?

  4. #4
    Matrix's Avatar
    Matrix is offline Admin
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2005
    Posts
    519
    Setup an ODBC data source first, refer to this tutorial. Actually most databases can be configured as ODBC data source. Then in Access, you can open an ODBC data source directly from 'File->Open', set 'Files of Type' as ODBC Database.

  5. #5
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    you mean I actually go to control panel to setup odbc?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Hi Marianne,
    I understand you are still struggling with this. I need to ask some questions first.
    1) What version of Access are you using and what Operating System?
    2) What is your background? Have you coded before?
    3) Do you have SQL Server?
    4) Do you know what ODBC means?

  7. #7
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    yes I am struggling. I am under winxp, ms access 2000. I know how to code but not that good. I have my sql server 2000 developer edition installer but did not installed it coz I was hoping I could connect ms access or link it to sql tables without sql server. I dont know what ODBC means rural guy.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm by no means competent on SQL Server but willing to give it a go. I've got MSDE on this machine and a complete Database and can try to get things going for you. I doubt you can access the SQL database without the Server running since that is the engine that knows how to run the db. Then you will need to get an ODBC driver to talk to the SQL Server. It is either already on your system or can be downloaded from MS.

  9. #9
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    I see. so may I ask if there is a type of database with access can connect directly?

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When you go to File>Get External Data>Link Tables... down at the bottom of the dialog for selecting a db in the Files Of Type: control, the last selection on mine is ODBC Databases (). Selecting that brings up another dialog box. If SQL Server were running, I believe we would have some selections in there. As it is, right now it is blank.

  11. #11
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    I read an article and here it is:

    Comment by Tom Miller
    August 23, 2007 @ 9:17 am
    You can also link SQL Tables into an Access database without a DSN by using a little bit of VBA code and DAO (yes, good old DAO):

    Public Function AttachTables()
    Dim tdTemp As TableDef
    Set tdTemp = CurrentDb.CreateTableDef("TableName")
    tdTemp.SourceTableName = "dbo.TableName"
    tdTemp.Connect = "ODBC;DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;Tr usted_Connection"
    ' without Trusted security, you can pass a user id and password instead:
    tdTemp.Connect = "ODBC;DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;ui d=UserID;pwd=PassWord"
    CurrentDb.TableDefs.Append tdTemp
    End Function

    WHAT IS YOUR COMMENT ON THIS RURAL GUY? IS THIS A WAY TO CONNECT TO SQL TABLES WITHOUT SQL SERVER?

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I have to ask what the big plan is? What is wrong with Jet as a BackEnd?

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by marianne View Post
    WHAT IS YOUR COMMENT ON THIS RURAL GUY? IS THIS A WAY TO CONNECT TO SQL TABLES WITHOUT SQL SERVER?
    It just means you can go around the DSN but you still use the ODBC driver and only SQL Server knows how to retrieve the records.

  14. #14
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    I wanted my database to be big. because I read an article that ms access is just small.

  15. #15
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    so does that mean that, on that code, sql server does not exist? but still able to connect to sql tables?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-09-2009, 12:20 PM
  2. connect from access to sql
    By kathyc in forum Programming
    Replies: 0
    Last Post: 09-28-2008, 12:50 PM
  3. relink to realative locatio to txt file using connect
    By tobynegus in forum Programming
    Replies: 0
    Last Post: 08-21-2008, 04:08 AM
  4. very slow when connect to access 2000
    By pureland in forum Access
    Replies: 0
    Last Post: 10-23-2007, 05:42 AM
  5. Replies: 3
    Last Post: 04-05-2006, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums