Created
August 3, 2009 12:38
-
-
Save steefjan/160526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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