Use VBA to query SQL Azure Database

Anonymous
2017-04-01T21:10:39+00:00

I'm a PC Excel developer. I use ADODB a lot. I have a workbook that allows users to enter search terms and uses those terms to query a database on SQL Azure. It works perfectly. 

I need to make a version for Mac. YIKES! A whole new world. I've read and researched and downloaded ODBC drivers and...still can't get one damned thing to download from my database. Don't get me wrong. I can use the interface to do it. I can open Microsoft Query and enter and query and run it and paste it to a sheet. All that. But I need a VBA solution.

Can someone just send sample code that will grab one record (Top 1) from my table in the Azure SQL database and return it to a sheet?

If I can do just that one thing, I'll figure out the rest. 

I have a free version of the Actual SQL Server ODBC driver. If there is away to do the above with buying anything I'd prefer it. 

Let me know if I can provide more info that will help.

tod

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Jim G 134.1K Reputation points MVP
    2017-04-03T15:55:13+00:00

    @ Jim - There is less value in posting a quick reply than in posting the answer to the question. If you don't know the answer, please refrain from answering, as it makes it look like you've actually answered the question, which you have not. MSDN is set up primarily to answer questions for Windows versions of Office. THIS forum is set up to answer questions about Office for Mac.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-04-02T03:00:28+00:00

    Hi Tod,

    We suggest you post in the MSDNforum for professional help as the requirement is relevant to development/coding and SQL. Thanks for your understanding.

    Best Regards,

    Jim

    Was this answer helpful?

    0 comments No comments