Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use a COM Interface Dll within C# code??? Pin
lane0p25-Mar-09 23:29
lane0p25-Mar-09 23:29 
GeneralRe: How to use a COM Interface Dll within C# code??? Pin
Dragonfly_Lee6-Mar-09 2:41
Dragonfly_Lee6-Mar-09 2:41 
GeneralRe: How to use a COM Interface Dll within C# code??? Pin
lane0p26-Mar-09 4:45
lane0p26-Mar-09 4:45 
QuestionHow to get the value from a variable and use it eg Form.VariableValue Pin
MarkB1235-Mar-09 5:53
MarkB1235-Mar-09 5:53 
AnswerRe: How to get the value from a variable and use it eg Form.VariableValue Pin
Xmen Real 5-Mar-09 5:57
professional Xmen Real 5-Mar-09 5:57 
GeneralRe: How to get the value from a variable and use it eg Form.VariableValue Pin
MarkB1235-Mar-09 8:06
MarkB1235-Mar-09 8:06 
QuestionHow to link the current website to your textbox ? Pin
YiXiang_895-Mar-09 5:52
YiXiang_895-Mar-09 5:52 
QuestionOledbException when trying to Insert values in two combobox Pin
haroon19805-Mar-09 5:44
haroon19805-Mar-09 5:44 
Hi, Here is below code as i am trying to populate two combobox for different values but getting OledbException while running:

I have two tables called
Packing and Products
Packing=id,name
Products:id,prodname,price,packing [defined by number]

I have setup relation between them in MSAccess which is done..

Product.Packing=Number
Packing.PackingName=Text

Code:

private void Form1_Load(object sender, EventArgs e)
        {
            
            string sql ="SELECT distinct ProductName FROM Products";
            string sql2 = "SELECT  pac.PackingName FROM Products prod,Packing pac where prod.Packing=pac.PackingName ";
                        
                        DataSet ds=new DataSet();
            
                        try 
                        {
                                database = new OleDbConnection(connectionString);
                database.Open();
                        }
                        catch (Exception x)
                        {
                                MessageBox.Show(x.Message);
                        }
                        
                        OleDbDataAdapter adp=new OleDbDataAdapter(sql,database);
            adp = new OleDbDataAdapter(sql2,database);
            
                        adp.Fill(ds,"ProductName");
            adp.Fill(ds,"PackingName");
                                                        
                        foreach (DataRow dr in ds.Tables[0].Rows) 
                        {
                                comboBox3.Items.Add(dr[0].ToString()) ;
                comboBox1.Items.Add(dr[1].ToString());
                                        
                        }
            
 
            }


Any help please...Thanks,
AnswerRe: OledbException when trying to Insert values in two combobox Pin
Yusuf5-Mar-09 8:07
Yusuf5-Mar-09 8:07 
GeneralRe: OledbException when trying to Insert values in two combobox Pin
haroon19805-Mar-09 12:24
haroon19805-Mar-09 12:24 
GeneralRe: OledbException when trying to Insert values in two combobox Pin
haroon19805-Mar-09 23:52
haroon19805-Mar-09 23:52 
QuestionLotus Notes (ConvertMIME) Pin
tomas cook5-Mar-09 4:46
tomas cook5-Mar-09 4:46 
AnswerRe: Lotus Notes (ConvertMIME) Pin
tomas cook11-Mar-09 0:47
tomas cook11-Mar-09 0:47 
QuestionHow to insert into Master/Details at the same time ? Pin
hdv2125-Mar-09 4:26
hdv2125-Mar-09 4:26 
AnswerRe: How to insert into Master/Details at the same time ? Pin
Eddy Vluggen5-Mar-09 4:45
professionalEddy Vluggen5-Mar-09 4:45 
GeneralRe: How to insert into Master/Details at the same time ? Pin
hdv2125-Mar-09 4:50
hdv2125-Mar-09 4:50 
GeneralRe: How to insert into Master/Details at the same time ? Pin
Eddy Vluggen5-Mar-09 5:11
professionalEddy Vluggen5-Mar-09 5:11 
GeneralRe: How to insert into Master/Details at the same time ? Pin
hdv2125-Mar-09 5:59
hdv2125-Mar-09 5:59 
GeneralRe: How to insert into Master/Details at the same time ? Pin
Eddy Vluggen5-Mar-09 6:36
professionalEddy Vluggen5-Mar-09 6:36 
GeneralRe: How to insert into Master/Details at the same time ? Pin
hdv2125-Mar-09 10:01
hdv2125-Mar-09 10:01 
GeneralRe: How to insert into Master/Details at the same time ? Pin
jaypatel5128-Mar-09 5:17
jaypatel5128-Mar-09 5:17 
Questioncustom property item in PropertyGrid Pin
dilipmca045-Mar-09 4:25
dilipmca045-Mar-09 4:25 
AnswerRe: custom property item in PropertyGrid Pin
netJP12L5-Mar-09 7:12
netJP12L5-Mar-09 7:12 
AnswerRe: custom property item in PropertyGrid Pin
Dragonfly_Lee5-Mar-09 18:22
Dragonfly_Lee5-Mar-09 18:22 
QuestionRun EXE from Remote machine in client machine... Pin
siva4555-Mar-09 4:09
siva4555-Mar-09 4:09 

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.