TBSupport
asked on
Excel Connnection to SQL through ODBC
Hello:
My new Windows 8 laptop will not let me attach files. When I tried, it closed Internet Explorer. Unfortunately, then, I will just have to explain the issue as best as I can.
I created an Excel spreadsheet which pulls in data from SQL. So, I have both an Excel spreadsheet and a .odc file.
The customer wanted the SQL query revised. So, I revised it. When I run the query in SQL, it executes and displays data perfectly.
But, when I paste the query into the Excel spreadsheet, replacing the original query, I get the following error upon refreshing Excel:
The query did not run, or the database table could not be opened. Check the database server or contact your database administrator. Make sure the external database is available and hasn't been moved or reorganized, then try the operation again.
Any ideas?
Thanks! Much appreciated!
TBSupport
My new Windows 8 laptop will not let me attach files. When I tried, it closed Internet Explorer. Unfortunately, then, I will just have to explain the issue as best as I can.
I created an Excel spreadsheet which pulls in data from SQL. So, I have both an Excel spreadsheet and a .odc file.
The customer wanted the SQL query revised. So, I revised it. When I run the query in SQL, it executes and displays data perfectly.
But, when I paste the query into the Excel spreadsheet, replacing the original query, I get the following error upon refreshing Excel:
The query did not run, or the database table could not be opened. Check the database server or contact your database administrator. Make sure the external database is available and hasn't been moved or reorganized, then try the operation again.
Any ideas?
Thanks! Much appreciated!
TBSupport
ASKER
SSMS
Try in query designer.
The easiest is probably to delete the query from excel, and then recreate it from scratch.
In my own queries, I make a trick to make excel independent from ODBC element After the workbook is ready, I open it with hex editor, find odbc description, and specify it there as DSN-less connecton (http://www.connectionstrings.com/microsoft-sql-server-odbc-driver/). After that, I can send the workbook to someone else and it will work.
The easiest is probably to delete the query from excel, and then recreate it from scratch.
In my own queries, I make a trick to make excel independent from ODBC element After the workbook is ready, I open it with hex editor, find odbc description, and specify it there as DSN-less connecton (http://www.connectionstrings.com/microsoft-sql-server-odbc-driver/). After that, I can send the workbook to someone else and it will work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I couldn't get it to work. I'll just move on to something else, as usual.
ASKER
So, this question can go to history, I'll give props to somebody.
What is "in SQL", exactly? SSMS? Excel Query Designer? something else?