I have created a c# windows form application using visual studio 2010, I would now like to create a setup exe file for my app, problem is, It requires a database to run, my question is how do i include this database in my setup.
I created the database using Oracle sql developer.
i am using a local connection ie. "System-XE"
Here is a code snippet of how the program communicates with the database.
string oradb = "Data Source=localhost:1521/XE;User Id=system;Password=5853123;";
OracleConnection conn = new OracleConnection(oradb);
try
{
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = "SELECT username from administrators where password = " + textBox2.Text;
cmd.CommandType = CommandType.Text;
OracleDataReader dr = cmd.ExecuteReader();
conn.Close();
loggedIn = true;
Close();
}
catch(Exception){
MessageBox.Show("Incorrect Credentials, please try again.");
}
finally
{
if (conn.State == ConnectionState.Open)
{
conn.Close();
}
}
loggedIn = true;
Close();