Member Avatar

Hey Guys, I have a question... I want to display data from two different tables into a single datagrid view. Problem is i dnt wana join the tables. pls check this code [code]private void bindgrid() { SqlConnection con = new SqlConnection(connStr); con.Open(); str1 = "Select * from wcl_et "; str2 = "Select * from secl_et"; str3 = "select * from sccl_et"; ad = new SqlDataAdapter(str1, con); ad.Fill(ds1, "wcl_et"); ad = new SqlDataAdapter(str2, con); ad.Fill(ds2, "secl_et"); //ds1.Merge(ds2); dataGridView1.DataSource = ds1.Tables[0].DefaultView; //dataGridView1.DataSource = ds1; //dataGridView1.DataBindings(); } private void Form1_Load(object sender, EventArgs e) { bindgrid(); } private void button1_Click(object sender, EventArgs e) { …

Member Avatar
-2 forum 10
Member Avatar

Hey guys, Here's the thing. I have a database in MS access. I have made an application that has to access this DB. Now this database is on another machine. Lets call it pc1. pc1 and my machine are in same wireless network. But when i try to connect to the database connection fails. Do need to put on internet or is there a workaround for this? let me put connection string i am using for this. Please let me know if there's anything wrong with it. [CODE]Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\xxx.xxx.xxx.xxx\\C:\\Users\\user1\\Documents\\DB1.accdb;[/CODE] Thanks Ajinkya

Member Avatar
+0 forum 3
Member Avatar

I need to know if it is possible to store click event of a button in a variable. I tried doing it but didn't get any solution. Please help Regards

Member Avatar
+0 forum 3
Member Avatar

Hi people I need some help here. Here is the CODE : [B]for Form1:[/B] [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace practice { public partial class Form1 : Form { Form2 obj; public Form1() { InitializeComponent(); } string str1 = "Data Source=Blackgold;Initial Catalog=MIS;Integrated Security=True"; private void button1_Click(object sender, EventArgs e) { string s = comboBox1.SelectedIndex.ToString(); obj = new Form2(s); obj.Show(); } private void Form1_Load(object sender, EventArgs e) { SqlConnection con = new SqlConnection(str1); con.Open(); SqlCommand cmd = new SqlCommand("Select Name from company", con); SqlDataReader dr = cmd.ExecuteReader(); …

Member Avatar
+0 forum 5
Member Avatar

Hey Guys, Currently, I am doing a project. I don't know how to pass a value from one windows form to another windows form using c#.net. Suppose, I have two forms parent form and child form. Parent form consists of a combo box & button and I want to pass selected item of combo box to my child form and that item will be showing in a text box of child form. How can I do that? Thanks and Regards

Member Avatar
+0 forum 6
Member Avatar

Example : suppose i have a form1 and a form2. form1 has a button on it which would display a message "Clicked" when clicked And if form2 inherits form1. How can i change the properties of that button and make display a message "Now Clicked" ? please help.....:?:

Member Avatar
+0 forum 1

The End.