ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Source Name (https://www.excelbanter.com/excel-programming/427768-re-data-source-name.html)

Gil

Data Source Name
 
i have the same problem, but when I click on edit for editing the query an
error message comes up telling the server rejected the connection.
My Databse was upgraded over the weekend but the name did not change.
Creating a new query works fine. ???
please help.

gil-

"joel" wrote:

I have good news and bad news.

The bad news :You can't change the connection. It is harder than just
changing the connection.

The good new is you can get your old setting and copy it to a new connection.

1) First I would get the old query properties and pste the properties into
Notepad. these are the instructions for Excel 2003. It is different for
excel 2007.

a)click on any cell it the returned query data. then go to menu

Data - Import External Data - Edit Query
b) Press the SQL button
c) Copy SQL data to Notepad

2) Clear entire worksheet where old query was located. Answer question that
you don't wnat to keep old query.

3) Create New connection using menu

Data - Import External Data - New Datbase Query (or any type query).

4) Select any options (at least one table entry). doesn't mater because yo
uare going to change then when you put in the old SQL Statements.

5) Continu going through the menus until you get to Finish. Select Edit
Query and then puh Finish. the qery editor will again appear.

6) Press SQL button. Copy SQL statments from Notepad into SQL window.

7) In Edit Query window go to menu

File - Return Data to Microsoft Excel

"LindaJo" wrote:

I have a spreadsheet that refreshes data from a data base. I need to change
the data base name (data source name). The tables and field selects are the
same but I need to connect to a different data source.


joel

Data Source Name
 
I was able to duplicate your problem by making a copy of my dattabase and
then create a query to the copy. I then savved my excel spreadsheet and quit
excel..I then went and deleted the copy of my database and opened the excel
spreadsheet. When I went to edit the query I got a message box asking me to
login to the database. here is what I did

1) Press the DATABASE button on the message box. Then slected another
database. You can select your original database
2) I continued and got anotehr error message saying i couldn't edit theh
query. I ignored the error message an d got into the edit query window.
3) Press SQL and got my SQL statements.

"gil" wrote:

i have the same problem, but when I click on edit for editing the query an
error message comes up telling the server rejected the connection.
My Databse was upgraded over the weekend but the name did not change.
Creating a new query works fine. ???
please help.

gil-

"joel" wrote:

I have good news and bad news.

The bad news :You can't change the connection. It is harder than just
changing the connection.

The good new is you can get your old setting and copy it to a new connection.

1) First I would get the old query properties and pste the properties into
Notepad. these are the instructions for Excel 2003. It is different for
excel 2007.

a)click on any cell it the returned query data. then go to menu

Data - Import External Data - Edit Query
b) Press the SQL button
c) Copy SQL data to Notepad

2) Clear entire worksheet where old query was located. Answer question that
you don't wnat to keep old query.

3) Create New connection using menu

Data - Import External Data - New Datbase Query (or any type query).

4) Select any options (at least one table entry). doesn't mater because yo
uare going to change then when you put in the old SQL Statements.

5) Continu going through the menus until you get to Finish. Select Edit
Query and then puh Finish. the qery editor will again appear.

6) Press SQL button. Copy SQL statments from Notepad into SQL window.

7) In Edit Query window go to menu

File - Return Data to Microsoft Excel

"LindaJo" wrote:

I have a spreadsheet that refreshes data from a data base. I need to change
the data base name (data source name). The tables and field selects are the
same but I need to connect to a different data source.



All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com