I have set up a small test data base (local) using MS SQL Server, code bellow.
Code here
SqlConnection cs = new SqlConnection(@"Data Source = .\SQLEXPRESS; Initial Catalog = OMS; Integrated Security = true");
SqlDataAdapter da = new SqlDataAdapter ();
da.InsertCommand = new SqlCommand("INSERT INTO Customer(FirstName,LastName) VALUES (@FirstName,@LastName)", cs);
da.InsertCommand.Parameters.Add("@FirstName", SqlDbType.VarChar).Value = firstname.Text;
da.InsertCommand.Parameters.Add("@LastName", SqlDbType.VarChar).Value = lastname.Text;
This is working well, now I have set up a MYSQL database hosted on a live server. I have installed the MYSQL connector I need for visual studios and have connected to the data base. what I now wish to know is how to alter my connection string to pace the data into the live database. I tried to put my host IP in eg:
SqlConnection cs = new SqlConnection(@"Data Source = 000.000.00.000; Initial Catalog = database name; Integrated Security = true");
However this is not working, any idea on what code I should use to connect to a live server? any help would be appreciated.