i am using C# Windows Application at default i have stored some values in listbox at page load i want to get all values from listbox
sakthi06karthi
Posts
-
how to select or get all values in listbox at pageload -
error while inserting table with autonumber using MsAccessHERE I USE ID AS AUTOINCREMENT
-
error while inserting table with autonumber using MsAccessdatabase fields r id username password 1 sakthi sakthi 2 ramesh ramesh 3 u u (autoincreament) and my coding using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Data.OleDb; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Reservation : Form { OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Documents and Settings\\intel\\Desktop\\DB.mdb"); OleDbCommand cmd; public Reservation() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { cn.Open(); cmd = new OleDbCommand("insert into Table1 values('" + textBox1.Text +"','" + textBox2.Text + "')", cn); cmd.ExecuteNonQuery(); MessageBox.Show("inserted"); } } } while insert its not inserted......... by sakthi
-
error while inserting table with autonumber using MsAccesshi to all ....... I am using c#.net windows application. for database MSAccess. while inserting values in the table it show that ((Number of query values and destination fields are not the same.)) data base field id name pass autonumber text text and my coding using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Data.OleDb; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Reservation : Form { OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Documents and Settings\\intel\\Desktop\\DB.mdb"); OleDbCommand cmd; public Reservation() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { cn.Open(); cmd = new OleDbCommand("insert into Table1 values('" + textBox1.Text + "','" + textBox2.Text + "')", cn); cmd.ExecuteNonQuery(); MessageBox.Show("inserted"); } } } while insert its not inserted......... by sakthi