When I run this code, I get no error. But the data does show up in SQL...any thoughts?
Code:private void bSubmit_Click(object sender, System.EventArgs e) { string sconn; string insertCommand; string to = tWhoTo.Text; //Request.Form("fDriveBy").(tWhoTo); sconn = "Provider=SQLOLEDB;Data Source=DOGFISH;InitialCatalog=DrvBy;Integrated Security=SSPI;"; insertCommand = "Insert into SYS_DRVBY(WhoFrom, WhoTo, dt, Comments) values('" + to + "','" + to + "','" + "11/01/2001" + "','" + "this is a test" + "')"; OleDbConnection conn = new OleDbConnection(sconn); conn.Open(); OleDbCommand cmd = new OleDbCommand(); cmd = new OleDbCommand(insertCommand,conn); }




Reply With Quote