I have written the code as below. here problem is that dt remain null. how to solve thst please tell me. public partial class Form1 : Form { private DataTable DTable; private DataRow drow; public Form1() { InitializeComponent(); } private OleDbConnection getConnection() { OleDbConnection con=new OleDbConnection (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\winApp for Student\winApp for Student\App_Data\SchooMgnSystem.mdb;Persist Security Info=True"); return con; } private void button1_Click(object sender, EventArgs e) { InsertData(); } private void InsertData() { if (DTable==null) { DTable = new DataTable(); DTable.Columns.Add("StudID", typeof(string)); DTable.Columns.Add("StudName", typeof (string)); DTable.Columns.Add("Address", typeof(string)); drow = DTable.NewRow(); drow[0] = txtStudID.Text; drow[1] = txtSTudName.Text; drow[2] = txtAddress.Text; DTable.Rows.Add(drow); grdStudent.DataSource = DTable; } else { drow = DTable.NewRow(); drow[0] = txtStudID.Text; drow[1] = txtSTudName.Text; drow[2] = txtAddress.Text; DTable.Rows.Add(drow); grdStudent.DataSource = DTable; } } private void button2_Click(object sender, EventArgs e) { string cmdstr; OleDbCommand cmd; OleDbConnection con = getConnection(); foreach (DataRow Drow in DTable.Rows) { cmdstr = "Insert into Student values('" + drow[0].ToString() + "','" + drow[1].ToString() + "','"+drow [2].ToString()+"')"; cmd = new OleDbCommand(cmdstr,con); try { con.Open(); cmd.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } }
A sample program using data structure? what is file handling?
What is Mutex error in Triggers?
When i am connect database through toad,one error occured. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. plz help me thanks advance.............
IMP-00000: Import terminated unsuccessfully Hi all . when i go to restore oracle dmp file in my database ans typing this command , C:UsersW>imp HR2011/HR2011@XE TABLES=* dmpfile=F:Share223.27.244.72EXP 2017-0113030008FU160710ZIP/FU160710.DMP this message was showed to me and restore mission filed . LRM-00101: unknown parameter name 'dmpfile' IMP-00022: failed to process parameters, type 'IMP HELP=Y' for help IMP-00000: Import terminated unsuccessfully how i can fix this problem plzzz
For pH-4 calculation it is subtracted from the previous pH7 buffer value is the same procedure to be followed for calculation of remaining buffers??
What severity level errors are managed in TRY-CATCH block?
ORA-07497: sdpri: cannot create trace file 'string'; errno = string.
if the lengths of two wires are same and the area of cross sections is 4:7 then what will be the ratio of current passing through these wires
why we are using shift key in unix shell script
hai i got one error i,e http status 404 error what is ds why ds is comming
In my project I am using star schema and only diimension tables are loaded and not fact tables any one can help me why it is happening? Plase guide me.
can u deactivate my music massage from mobily? some times i recharge my a/c then after sometimes one massage come and sr.4/- debited from my account. so please help me stop the massage about music or what. i don't know stop them please.from yesterday i have lose sr.8/- from my account.
Program ended with error or warning, return code: 4
Hi can any one help me below two steps in sap FICO, 1.Create document number ranges for company code. 2.Copy document number ranges to fiscal year. was trying to do it but i am not able to completing successfully,