New SQL Express so need to update Connection

finspa

New Member
Joined
Jan 15, 2015
Messages
42
Hi All

I have a report set up with around 100 pivot tables set up connected to a SQL Express Connection. I have been given a new PC at work so I have a new instance of SQL Ex.

I have 'restored' my old tables onto my new machine and now I need to point my pivot tables at the new version.

My initial reaction was to change the pc name in the properties - Definition - connection string, but this doesn't seem to do anything!

For example changing the bold bits here...
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=Markets;Data Source=OLD-PC\SQLEXPRESS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=OLD-PC;Use Encryption for Data=False;Tag with column collation when possible=False

to

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=Markets;Data Source=NEW-PC\SQLEXPRESS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=NEW-PC;Use Encryption for Data=False;Tag with column collation when possible=False

Is there a way to update the connection without having to recreate all the pivots and charts?!

Many thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
if those strings are in the VBA, just a text find and replace ?
 
Upvote 0
Can't you right click the pivot tables, select Change Data Source... and point them towards the new instance of SQL Server?
 
Upvote 0
Can't you right click the pivot tables, select Change Data Source... and point them towards the new instance of SQL Server?

I have just created a new connection and was attempting to do exactly as you suggested. The problem is, I have a lot of pivot tables and quite a few slicers so, apparently, I have to remove the slicer connection from each pivot table, change the data source for each and then reapply the slicer.

I was really hoping I could just amend the existing data source/connection!!
 
Upvote 0
When you changed the connection as indicated in your first post you said nothing happened.

What do you mean exactly?

Did you get any errors when you refreshed the pivot tables/slicers etc.?

When you refreshed were they not actually updated?
 
Upvote 0
When you changed the connection as indicated in your first post you said nothing happened.

What do you mean exactly?

Did you get any errors when you refreshed the pivot tables/slicers etc.?

When you refreshed were they not actually updated?

Hi Norrie

There was no error message, it seemed to work, however, it did not load the data.

The report I am running is based on Sales per quarter. The SQL table I connect to now has Q1 2018 in, so obviously I want to include that.
When added the new data connection, the Q1 2018 data is there, no problem. But, when I changed the connection string as above, the report refreshed and my "Quarter" slicer showed "Q1 2018" but it was greyed out, as in there was no data there.
The original data seemed to refresh OK but I just assumed that was something to do with the cache.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top