edit sql datasource
Dears,
am wondering if anyone face the same problem I have in Excel 2013.
if you have an existing or create a data source from SQL query and get the data, then save the file, after a while open the file and change the SQL script "like change the where statement", you will get the refreshed data , but saving now is not
working
open the file again and you'll see it same old query not the edited one.
Regards
Ahmed
December 1st, 2013 2:47pm
if editing in connection command text then SAVE file, re-open no changes saved
-
Edited by
WindowsScorpion
Monday, December 02, 2013 9:56 AM
December 2nd, 2013 7:22am
anybody is facing this problem in excel
December 3rd, 2013 3:47pm
I Cant reproduce the issue you mentioned.
Make sure you save the workbook successfully.
Open the workbook, change the SQL query, make some changes in this workbook before you save it.
December 4th, 2013 1:23am
am sure about what am doing.
saving the workbook successfully and close it
then re-open, change the query and have the new data and make a refresh in other pivots in the same workbook and save successfully.
re-open the old query is there and need to re-change again
December 4th, 2013 6:09am
Does this issue happen with all workbooks or just this one?
1.Try to send the workbook to others to test this issue.
2.Try to open this workbook with 'Open and Repair' mode
File->Open->select the workbook, choose 'Open and Repair'
December 4th, 2013 7:04am
it in all workbook for excel 2013, I never face it in old versions
and the files are not corrupted
have you try it at your side?
December 4th, 2013 2:32pm
Yes.As I said, I can't reproduce this issue. I'm using excel 2013.
I use SQL query to get data from database frequently and never face such an issue.
December 5th, 2013 1:49am
Thank you Mr. Zhang for replying.
try this scenario at your side
create new Excel connect to NORTHWND and put this script
SELECT * FROM Categories
save and close
re-open and change by adding where statement
SELECT * FROM Categories where CategoryID='1'
refresh save and close
re-open and look at your script!!
December 5th, 2013 6:27am
I have no such a database, but I tried a similar SQL query with my database.
1.Create a workbook, put a script to the command text, save it.
2.Reopen it,change the script as select * from users where userid=2 ,click ok, save it.
3. Re-open this file, my script saved
So I guess this issue is caused by your office program.
-
Marked as answer by
WindowsScorpion
Friday, December 06, 2013 7:07 AM
-
Unmarked as answer by
WindowsScorpion
Sunday, December 08, 2013 11:54 AM
December 6th, 2013 3:19am
Thanks a lot
so it's not common problem ,I'll try to repair my office program
-
Edited by
WindowsScorpion
Friday, December 06, 2013 7:09 AM
December 6th, 2013 7:09am
I've repair Office from set-up disc but still I've the same problem, it's not saving the changes in the where statement of SQL script
my system versions
Microsoft Office Professional Plus 2013
Windows 8 Pro (64 bit)
December 8th, 2013 11:54am
I am having the same issue, so you are not alone.
I open my spreadsheet and choose data connections properties and edit the command text and click OK. The data refreshes and looks good according to my new query. If I open the connection properties again I can see the changes I made. Then I save the
spreadsheet. It is saved as a .xlsm because I have macros and a customized tool bar. I close the spreadsheet. I re-open the spreadsheet and go look at the sql statement in the command text. It not longer contains my changes, even though the sql
is working. The sql I changes is working fine, but the command text has reverted back to the original text. The spreadsheet must be keeping two copies of the SQL command text for it to correctly run what was last saved and also remember the old
SQL command text for display. I have to keep a copy of my running sql in a text file, so I don't forget what really is processing.
It may be because I am using the .xlsm file since I have customized my tool bar for the users.
Are you also using the .xlsm type of file?
March 31st, 2015 10:37am