IN SQL Server 2014 how to select access mdb table ? pls sample!

Man Poon 0 Reputation points
2023-04-25T04:19:43.8466667+00:00

IN SQL Server 2014 how to select access mdb table ? pls sample!

Windows for business | Windows Client for IT Pros | User experience | Other
SQL Server | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-04-25T06:20:58.2533333+00:00

    Why have you tagged your post with Win 10; there is no relation to? See MS Learn => OPENROWSET (Transact-SQL) => Examples => B. Using the Microsoft OLE DB Provider for Jet

    0 comments No comments

  2. Limitless Technology 44,751 Reputation points
    2023-04-25T14:53:19.47+00:00
    
    Hi,
    
    I'd be happy to help you out with your question. Sorry for the inconvenience caused.
    
    To select data from a Microsoft Access database table in SQL Server 2014, you can use the OPENROWSET function. The OPENROWSET function allows you to access data from a remote data source, in this case, your Access database file.
    
    Here's an example query you can use:
    
    SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
                            'Data Source=C:\path\to\your\access\database.accdb;
                             User ID=admin;Password=yourpassword',
                            TableName)
    
    To use this query, you'll need to replace C:\path\to\your\access\database.accdb with the actual path to your Access database file, yourpassword with the actual password (if any), and TableName with the name of the table you want to select data from.
    
    It's important to note that you may need to install the Microsoft Access Database Engine (either 32-bit or 64-bit depending on your SQL Server architecture) to be able to use the Microsoft.ACE.OLEDB.12.0 provider.
    
    For more Information, please refer to following resource :-
    
    SELECT statement (Microsoft Access SQL) - https://learn.microsoft.com/office/client-developer/access/desktop-database-reference/select-statement-microsoft-access-sql
    
    If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
     
    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.