TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
693
1.3k
219.5k
Table to table
Apr 8 2015 2:32 PM
Hi!
After making my filter using a datagrid. How can I transfer my row from my
test
table to another table(for example
test2
)?
private void button3_Click(object sender, EventArgs e)
conn.Open();
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select * from test where [name] = ? and [absent] = ?";
var param1 = new OleDbParameter("@name", OleDbType.VarChar);
var param2 = new OleDbParameter("@absent", OleDbType.VarChar);
param1.Value = comboBox1.Text;
param2.Value = label4.Text;
cmd.Parameters.Add(param1);
cmd.Parameters.Add(param2);
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(dt);
conn.Close();
dataGridView1.DataSource = dt;
}
Reply
Answers (
2
)
regarding session
FastReport custom object as Datasource