Connect to Microsoft SQL Server using VBA

Sdílet
Vložit
  • čas přidán 11. 09. 2024

Komentáře • 32

  • @theresahanvunguyen1677

    Thanks, really helpful! Amongst many videos, I found my answers here.

  • @turkaykoc8587
    @turkaykoc8587 Před rokem

    Thank you very much for sharing valuable information.

  • @Yaponets5
    @Yaponets5 Před 2 lety

    Спасибо, ты лучший в мире!

  • @aakashkadam2053
    @aakashkadam2053 Před 2 lety

    Thanks 👍

  • @bassfischer4273
    @bassfischer4273 Před rokem

    Thank you! Interesting and informative content. Question.. You did not include any clean-up in your demo.. closing of connection, destroying objects, etc. Do you not consider that necessary?

  • @harmeetsingh1991
    @harmeetsingh1991 Před 3 lety

    Good content

  • @dislook4954
    @dislook4954 Před 2 lety

    Very nice, and we wish for lessons on linking excel VBA to sql server in addition, can I ask you a programming question, if you allow me

  • @rushabkumat2148
    @rushabkumat2148 Před 2 lety

    I am getting an error in the second last line. How can I manage it. When I write sql query select* the code is working properly but when I write select distinct. I am getting an error in rssql.open sqlQuery, connection, adopenstatic

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před 2 lety

      Do You use MS SQL --> TSQL? Have You tried to seek in Google? If both yes and still got the problem contact me directly and send the code, we will try figure something out :)

  • @johnharry1849
    @johnharry1849 Před rokem

    hi. how to access database through network and to other PC's?
    what is the connection string?

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před rokem

      Hello
      Just ask the owner for the connection string or for the details which will allow You to connect to his database.

  • @rabihelhabta4399
    @rabihelhabta4399 Před rokem

    how can you get the table from sql with column name? and how you can reverse this process, i.e. a vba code that will update sql table from excel data? thank you

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před rokem

      To get the column name instead of * in SELECT query type its name. To update the sql table use SQL query UPDATE instead of SELECT

    • @rabihelhabta4399
      @rabihelhabta4399 Před rokem

      @@SimpleExcelVBA Amazing!, thank you for your prompt answer 😃

  • @kamalsardana4211
    @kamalsardana4211 Před 2 lety

    Hey man!! Can you create the same video and i want to write my query in Excel.
    Thanks in advance

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před 2 lety

      Hello! What query? :)

    • @kamalsardana4211
      @kamalsardana4211 Před 2 lety

      In your video you have pasted your query within your code. I want to create an excel vba program such that the query will be written by a user within excel worksheet rather than in a vba code directly

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před 2 lety

      @@kamalsardana4211 So in the place where query is pasted directly, put the range of the cell where the user will write query by himself :)

  • @shankhapedia
    @shankhapedia Před rokem

    Can You reply a Code That can Retrieve Column Header from ADODB Recordset.
    This Code Works Perfectly.
    But, the Provider Name Change to 'MSOLEDBSQL'.
    ASSUME ME AS BEGINNER.
    THANK YOU FROM INDIA.

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před rokem

      Hi, did You mean how to get ONLY column header or how to get a whole column using ADODB? I'm sorry, I don't understand what is the question.

    • @shankhapedia
      @shankhapedia Před rokem

      I Just Want to Include All the Column Headers (From SQL Server) to First row in Excel, Along With the data in next row(which I get from SQL Query as shown in this video).
      I Want to Retrieve Whole Table.

    • @SimpleExcelVBA
      @SimpleExcelVBA  Před rokem

      @@shankhapedia Have You tried to include HDR=Yes in connection string like I showed in simpleexcelvba.com/how-to-sql-query-excel-data-in-vba/

    • @shankhapedia
      @shankhapedia Před rokem

      @@SimpleExcelVBA No. I didn't use HDR.
      As soon as I try this, Let you know in Comment.
      Thank You 💗.