Click here to Skip to main content
15,920,602 members
Home / Discussions / C#
   

C#

 
GeneralRe: select max(string) Pin
Zeyad Jalil19-Nov-08 22:11
professionalZeyad Jalil19-Nov-08 22:11 
GeneralRe: select max(string) Pin
Parwej Ahamad19-Nov-08 22:28
professionalParwej Ahamad19-Nov-08 22:28 
QuestionProblem with JavaScript Date process Pin
kheer19-Nov-08 19:36
kheer19-Nov-08 19:36 
AnswerRe: Problem with JavaScript Date process Pin
leppie20-Nov-08 0:23
leppie20-Nov-08 0:23 
AnswerRe: Problem with JavaScript Date process Pin
Guffa20-Nov-08 0:45
Guffa20-Nov-08 0:45 
QuestionDisplay data from ms access database..... Pin
raj23136219-Nov-08 19:35
raj23136219-Nov-08 19:35 
AnswerRe: Display data from ms access database..... Pin
Matjaz-xyz19-Nov-08 20:38
Matjaz-xyz19-Nov-08 20:38 
GeneralRe: Display data from ms access database..... Pin
raj23136219-Nov-08 21:49
raj23136219-Nov-08 21:49 
here is my code.....

for delete:-

private void button3_Click(object sender, EventArgs e)
{
conn.Open();
string command1 = "delete from employee where (emp_id = ? AND emp_code = ? AND emp_name = ? AND emp_address = ? AND emp_dob = ? AND emp_doj = ? AND emp_dor = ?)";

OleDbDataAdapter da = new OleDbDataAdapter(command1, conn);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
conn.Close();
}

for edit:--

private void button2_Click(object sender, EventArgs e)
{
conn.Open();
string sqlcom = "select emp_id,emp_code,emp_name,emp_address,emp_dob,emp_doj,emp_dor from employee where (emp_code=?)";
OleDbDataAdapter da = new OleDbDataAdapter(sqlcom , conn);

DataSet ds = new DataSet();
//ds.Clear();
da.Fill(ds);

if (ds.Tables[0].Rows.Count > 0)
{
int a = Convert.ToInt32(ds.Tables[0].Rows[0]["emp_id"]);

textemp_id.Text = a.ToString();

}
else
{
MessageBox.Show("This E-Code does not exist");
}

conn.Close();

}


i am new in c#..this code is not working..if any change plz modify it.
Thanks
Question.net remoting(client - server) Pin
balu1234519-Nov-08 19:15
balu1234519-Nov-08 19:15 
AnswerRe: .net remoting(client - server) [modified] Pin
Pedram Behroozi19-Nov-08 20:08
Pedram Behroozi19-Nov-08 20:08 
AnswerRe: .net remoting(client - server) Pin
Dave Kreskowiak20-Nov-08 1:55
mveDave Kreskowiak20-Nov-08 1:55 
QuestionTracing process file and vice versa Pin
Muammar©19-Nov-08 17:00
Muammar©19-Nov-08 17:00 
AnswerRe: Tracing process file and vice versa Pin
Jimmanuel20-Nov-08 2:52
Jimmanuel20-Nov-08 2:52 
GeneralRe: Tracing process file and vice versa Pin
Muammar©21-Nov-08 1:37
Muammar©21-Nov-08 1:37 
Questionsave null to sql using Linq to Sql Pin
mutafa8119-Nov-08 14:01
mutafa8119-Nov-08 14:01 
AnswerRe: save null to sql using Linq to Sql Pin
Mycroft Holmes19-Nov-08 14:42
professionalMycroft Holmes19-Nov-08 14:42 
GeneralRe: save null to sql using Linq to Sql Pin
mutafa8119-Nov-08 16:55
mutafa8119-Nov-08 16:55 
GeneralRe: save null to sql using Linq to Sql Pin
leppie20-Nov-08 0:24
leppie20-Nov-08 0:24 
AnswerRe: save null to sql using Linq to Sql Pin
Mirko198020-Nov-08 0:59
Mirko198020-Nov-08 0:59 
GeneralRe: save null to sql using Linq to Sql Pin
mutafa8120-Nov-08 1:51
mutafa8120-Nov-08 1:51 
GeneralRe: save null to sql using Linq to Sql Pin
Mirko198020-Nov-08 2:25
Mirko198020-Nov-08 2:25 
QuestionProperty vs Variable? Pin
That Asian Guy19-Nov-08 13:59
That Asian Guy19-Nov-08 13:59 
AnswerRe: Property vs Variable? Pin
PIEBALDconsult19-Nov-08 14:04
mvePIEBALDconsult19-Nov-08 14:04 
GeneralRe: Property vs Variable? Pin
That Asian Guy19-Nov-08 14:13
That Asian Guy19-Nov-08 14:13 
GeneralRe: Property vs Variable? Pin
DaveyM6919-Nov-08 14:28
professionalDaveyM6919-Nov-08 14:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.