Skip to content

Instantly share code, notes, and snippets.

@steefjan
Created August 3, 2009 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steefjan/160526 to your computer and use it in GitHub Desktop.
Save steefjan/160526 to your computer and use it in GitHub Desktop.
private void btnTestOracle_Click(object sender, EventArgs e)
{
EMPLOYEESRECORDSELECT[] selectRecords = new EMPLOYEESRECORDSELECT[0];
// Initialize WCF client variables
HR_Table_EMPLOYEESClient aaTableClient = null;
try
{
// initialize the EMPLOYEES table client
aaTableClient = new HR_Table_EMPLOYEESClient("OracleDBBinding_HR_Table_EMPLOYEES");
//Security Credentials
aaTableClient.ClientCredentials.UserName.UserName = "HR";
aaTableClient.ClientCredentials.UserName.Password = "welkom";
//Open Client
aaTableClient.Open();
// Select all records and write them to the textbox result
selectRecords = aaTableClient.Select("*", "LAST_NAME = '" + txtLastName.Text + "'");
txtResultOracle.Text = "First Name :" + selectRecords[0].FIRST_NAME + "\r\n" + "Email :" + selectRecords[0].EMAIL + "\r\n" + "Phone Number : " + selectRecords[0].PHONE_NUMBER;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
aaTableClient.Close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment