Hello I am trying to connect my c# application I used this code I found on net but it doest seem to work here is the code
SqlConnection myConnection = new SqlConnection("user id=ayoya;" +
"password=12333;" +
"server=instance28181.db.xeround.com:18422;" +
"Trusted_Connection=yes;" +
"database=salam;" +
"connection timeout=30;");
try
{
myConnection.Open();
}
catch (Exception a)
{
Console.WriteLine(a.ToString());
MessageBox.Show("Failed");
}
can someone please tell me where I went wrong?
In general, after connecting to the instance creating a DB (using CREATE DATABASE), you must make sure the following parameters contain the correct arguments:
Hostname– See DNS Name in the Details tab;port #– appears by the hostname;username&password– the username and password you provided for the DB instance (also appears in Details tab);database– the name of the DB (NOT the instance name) to which you‘re trying to connect.Now, more specifically, try the following code to connect your c# application to your xeround DB:
Good luck 😉