So I've generated the table I need, and I need the ability to change my connection string when my program is started. At the moment my connection is

```
"metadata=res://*/entityframework.Model1.csdl|res://*/entityframework.Model1.ssdl
|res://*/entityframework.Model1.msl;provider=MySql.Data.MySqlClient;
provider connection string=&quot;server=localhost;User Id=myuserid;
password=12345678;database=databasename&quot;"

```

What I have so far

Get.designer.cs file:

```
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.EntityClient;
using Npgsql;
using System.Configuration;
using System.Data.Entity;
using System.Data.Entity.Validation;
using patientlist.entityframework;
using System.Xml;

namespace patientlist
{
    public partial class Get : Form
    {
        Timer update = new Timer();//60000 = 1min
        public Get()
        {
            InitializeComponent();
        } ....

    private void Timer(object sender, EventArgs e)
    {
        string connectionString = "metadata=res://*/entityframework.Model1.csdl|res://*/entityframework.Model1.ssdl|res://*/entityframework.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;User Id=myuserid;password=12345678;database=databasename&quot;";

        using (var blah = new ltcsystemEntities())
        {
            blah.Database.Connection.ConnectionString = connectionString;
        } .....

```

I'm using EF5, and it's DB first (I generated some automated code from my entity model)