I would like to insert some data into an Access Database.
DataTable dt = new DataTable();
String sql = string.Format("SELECT * FROM {0} where 1=0; ", tmap.SqlTableName);
string con = string.Format(conn, accessPath);
OleDbDataAdapter da = new OleDbDataAdapter(sql, con);
OleDbCommandBuilder cmdBuilder = new OleDbCommandBuilder(da);
da.Ins...
the project I'm working on uses the OleDb provider classes to connect to various databases. I have no choice in the matter. I have to update it so that it works with the new "time" column type in SQL 2008. My connection string is using "Provider=SQLNCLI10;"... and this seems to know about all the types except "time". Whereas the SqlC...
I'm working with a single NpgsqlConnection from 2 threads. Connection is protected via lock. All SQL commands are in fact calls to 3 different stored procedures, one procedure per call.
The program runs whole day, 24 hours. At some point (not very often - like, several times a day) when another call is issued to one of these stored proc...
I have a couple of columns of data in an excel sheet which I have to import to my application.
I do this using -
string strConn;
OleDbDataAdapter oledaExcelInfo;
strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + Server.MapPath(strSavePath + strRepFileName) + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";
oledaExcelI...