VBA/SQL

  • Feels like not a sensible question but, I've some VBA skills, and just wondering if VBA can be used for SQL Server in any capacity?? or is it T-SQL that does every bit of programming for SQL Server.

  • Think if it this way:

    T-SQL does all the data manipulation

    VBA does the front end stuff (if you're using something like an Access FE and a SQL Server BE) -- pretty much just handling the GUI.

    Unless you have to do automation of some kind in VBA that cannot be done in T-SQL very easily. While recordsets in VBA are okay, cursors in T-SQL (the T-SQL equivalent) are frowned upon. Really slow, most of the time not necessary.

  • pietlinden (4/22/2015)


    Think if it this way:

    T-SQL does all the data manipulation

    VBA does the front end stuff.

    Unless you have to do automation of some kind in VBA that cannot be done in T-SQL very easily.

    Thanks, understood the basic idea.

    Can I use VBA code inside SSMS in SQL Server, or does SQL Server has an equivalent editor, like as in MS Access, to write VBA code please?

  • gfx99ne (4/22/2015)


    pietlinden (4/22/2015)


    Think if it this way:

    T-SQL does all the data manipulation

    VBA does the front end stuff.

    Unless you have to do automation of some kind in VBA that cannot be done in T-SQL very easily.

    Thanks, understood the basic idea.

    Can I use VBA code inside SSMS in SQL Server, or does SQL Server has an equivalent editor, like as in MS Access, to write VBA code please?

    The answer is no, can't use VBA, use T-SQL to write functions and procedures instead.

    😎

  • Thanks for clearing my confusion.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply