Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default can't change query definition in MSQuery

Hi,
We've got "reports" in Excel 2002 that were created using MSQuery to
run queries against an Oracle database. Now we need to alter the
query. We modify the query, return the data to Excel, but the altered
SQL is not saved. Is this a bug? Shouldn't we be able to edit and
save the query?
I've used VBA before to change the connection property of pivot
tables but I didn't think VBA was necessary to modify the SQL.
Thanks,
Scott P.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default can't change query definition in MSQuery

You certainly should be able to save the edited query witout having to use
VBA. I do it all the time and have never run up against the problem you are
having. I can't tell why it is happening or give a definitive fix, but one
thing I would try would be to go into MSQuery, make the changes, then save
the query (from inside MSQuery) as a query file. Perhaps just the act of
doing so will make Excel recognize that the query has changed - but if not,
at the very least you will have a saved copy of the query and, if necessary,
can rebuild the querytable by specifying the new query file.

Wish I had better advice to give you, but I can only give what I've got, and
in this case it's just speculation.
K Dales

"scottgp" wrote:

Hi,
We've got "reports" in Excel 2002 that were created using MSQuery to
run queries against an Oracle database. Now we need to alter the
query. We modify the query, return the data to Excel, but the altered
SQL is not saved. Is this a bug? Shouldn't we be able to edit and
save the query?
I've used VBA before to change the connection property of pivot
tables but I didn't think VBA was necessary to modify the SQL.
Thanks,
Scott P.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default can't change query definition in MSQuery

K,
Thanks for replying. Just to update you: I tried saving the query
but that didn't make a difference. However, some more testing
indicated that it seems to be ODBC driver specific. I inserted a new
sheet and created a query going against a SQL Server database. I was
able to subsequently modify the query and the changes were saved. I
then tried a newer version of the Oracle ODBC driver but it didn't make
a difference.
As a general gripe, I with MSQuery was better documented. Oh well.
Thanks,
Scott

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Query Definition Nigel Excel Discussion (Misc queries) 0 November 23rd 09 11:38 AM
creating a query using MSQuery matpj Excel Discussion (Misc queries) 1 November 27th 08 07:22 PM
lost query definition rachael Excel Discussion (Misc queries) 0 March 9th 07 08:39 PM
Multiple ODBC Database lik in one MSQUERY query Alain79 Excel Discussion (Misc queries) 0 September 13th 05 12:25 PM
Edit Query from Excel will not open query in MSQuery Michelle Excel Programming 0 February 21st 05 03:59 PM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"