Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
QuestionHow can I run this command through c#? Pin
dan!sh 22-Nov-07 22:55
professional dan!sh 22-Nov-07 22:55 
AnswerRe: How can I run this command through c#? Pin
Andrei Ungureanu22-Nov-07 22:58
Andrei Ungureanu22-Nov-07 22:58 
Questiondisplaying data from 1 form to another Pin
csanda122-Nov-07 22:46
csanda122-Nov-07 22:46 
AnswerRe: displaying data from 1 form to another Pin
Andrei Ungureanu22-Nov-07 22:48
Andrei Ungureanu22-Nov-07 22:48 
GeneralRe: displaying data from 1 form to another Pin
csanda122-Nov-07 22:50
csanda122-Nov-07 22:50 
GeneralRe: displaying data from 1 form to another Pin
Andrei Ungureanu22-Nov-07 22:54
Andrei Ungureanu22-Nov-07 22:54 
GeneralRe: displaying data from 1 form to another Pin
Andrei Ungureanu22-Nov-07 23:01
Andrei Ungureanu22-Nov-07 23:01 
GeneralRe: displaying data from 1 form to another Pin
csanda122-Nov-07 23:12
csanda122-Nov-07 23:12 
Sorry for being vague.This is the code in form 2
 <br />
private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=datatry.mdb";<br />
            string Company = txtSearch.Text;<br />
            string select = "SELECT * FROM ecmain WHERE CompanyName Like  '" + Company + "'";<br />
            OleDbConnection datatryConn = new OleDbConnection(strConnection);<br />
            datatryConn.Open();<br />
<br />
            OleDbDataAdapter da = new OleDbDataAdapter(select, datatryConn);<br />
            DataSet ds = new DataSet();<br />
<br />
            da.Fill(ds, "ecmain");<br />
<br />
            update frm = new update(txtSearch.Text );<br />
            frm.Show();<br />
           <br />
            datatryConn.Close(); <br />

code in form 2
<br />
 private void btnUpdate_Click(object sender, EventArgs e)<br />
        {<br />
<br />
            string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=datatry.mdb";<br />
<br />
            string select = "Update ecmain SET CompanyName ='" + txtCompany.Text + "' , ContactName ='" + txtName.Text + "',ContactSurname='" + txtSurname.Text + "', Designation='" + txtDesignation.Text + "',TelephoneNumber='" + txtTel.Text + "', Faxnumber= '" + txtFax.Text + "', Email='" + txtEmail.Text + "',City/Town='" + txtCity.Text + "',PostCode='" + txtPost.Text + "',NumberofEmployees='" + txtEmployees.Text + "', Export='" + cbxExport.SelectedItem + "',ExportDestinations='" + txtDestination.Text + "', SIC Product 1='" + txtSic1.Text + "', Product1_Description='" + txtProduct1.Text + "', SICProduct2='" + txtSic2.Text + "', Product2Description='" + txtProduct2.Text + "', SICProduct3='" + txtSic3.Text + "', Product3Description='" + txtProduct3.Text + "', GeneralComments='" + txtComment.Text + "', Complete='" + cbxComplete.SelectedItem + "' Where CompanyName='" + txtSearch.Text + "'";<br />
            OleDbConnection datatryConn = new OleDbConnection(strConnection);<br />
            OleDbCommand cmd = new OleDbCommand(select, datatryConn);<br />
<br />
            datatryConn.Open();<br />
            cmd.ExecuteNonQuery();<br />
            datatryConn.Close();<br />
            MessageBox.Show("Updated successfully!");<br />
        }<br />


Easy guys im new to programming

csanda
GeneralRe: displaying data from 1 form to another Pin
Andrei Ungureanu22-Nov-07 23:25
Andrei Ungureanu22-Nov-07 23:25 
GeneralRe: displaying data from 1 form to another Pin
csanda123-Nov-07 0:22
csanda123-Nov-07 0:22 
GeneralRe: displaying data from 1 form to another Pin
Andrei Ungureanu23-Nov-07 1:13
Andrei Ungureanu23-Nov-07 1:13 
GeneralRe: displaying data from 1 form to another Pin
Pete O'Hanlon23-Nov-07 1:17
mvePete O'Hanlon23-Nov-07 1:17 
GeneralRe: displaying data from 1 form to another Pin
Joe22-Nov-07 23:01
Joe22-Nov-07 23:01 
GeneralRe: displaying data from 1 form to another Pin
benjymous22-Nov-07 23:27
benjymous22-Nov-07 23:27 
GeneralRe: displaying data from 1 form to another Pin
csanda122-Nov-07 23:15
csanda122-Nov-07 23:15 
GeneralRe: displaying data from 1 form to another Pin
benjymous22-Nov-07 23:48
benjymous22-Nov-07 23:48 
AnswerRe: displaying data from 1 form to another Pin
Aparna.B23-Nov-07 1:05
Aparna.B23-Nov-07 1:05 
QuestionHow to apply styles to excel ? Pin
tr_thorn22-Nov-07 22:40
tr_thorn22-Nov-07 22:40 
QuestionGenerics question 2 Pin
calendarw22-Nov-07 22:39
calendarw22-Nov-07 22:39 
QuestionPop-Out like window Pin
Programm3r22-Nov-07 22:23
Programm3r22-Nov-07 22:23 
Questionhow to export an html image file into pdf format Pin
chithra.r22-Nov-07 21:53
chithra.r22-Nov-07 21:53 
AnswerRe: how to export an html image file into pdf format Pin
dan!sh 22-Nov-07 22:00
professional dan!sh 22-Nov-07 22:00 
AnswerRe: how to export an html image file into pdf format Pin
pmarfleet22-Nov-07 22:04
pmarfleet22-Nov-07 22:04 
QuestionHow to pass multiple parameter SqlParameter in one? Pin
TheShihan22-Nov-07 21:37
TheShihan22-Nov-07 21:37 
AnswerRe: How to pass multiple parameter SqlParameter in one? Pin
N a v a n e e t h22-Nov-07 21:54
N a v a n e e t h22-Nov-07 21:54 

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.