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?
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
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
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
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 :)
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.
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.
Thanks, really helpful! Amongst many videos, I found my answers here.
Happy to hear that :)
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?
It would be nice, but it is not necessary. It automatically cleans up after code ends.
@@SimpleExcelVBA Thank you.
@@bassfischer4273 You're welcome :)
hi. how to access database through network and to other PC's?
what is the connection string?
Hello
Just ask the owner for the connection string or for the details which will allow You to connect to his database.
Thank you very much for sharing valuable information.
You're welcome :)
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
Sure, ask whatever You want to ask :)
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
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
@@SimpleExcelVBA Amazing!, thank you for your prompt answer 😃
Hey man!! Can you create the same video and i want to write my query in Excel.
Thanks in advance
Hello! What query? :)
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
@@kamalsardana4211 So in the place where query is pasted directly, put the range of the cell where the user will write query by himself :)
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
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 :)
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.
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.
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.
@@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/
@@SimpleExcelVBA No. I didn't use HDR.
As soon as I try this, Let you know in Comment.
Thank You 💗.
Спасибо, ты лучший в мире!
Thank You!
Thanks 👍
You're welcome!
Good content
Thank You!