We have a existing closed source third party application using a Pervasive PSQL database. For Example the PSQL are located in the directory c:\test and have names like holiday.dat, offers.dat and so on. I want to read and if possible write to these files without having installed the Pervasive Workstation Engine. With the Workstation Engi...
How would insert a row into an excel document. This is what I have.
String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + file_path + ";Extended Properties=Excel 8.0;";
DataTable dt = new DataTable();
DataSet ds = new DataSet();
OleDbConnection conn = new OleDbConnection(connString);
...
I need to extract data from a .dbf file and transform it into xml. I wrote a routine that does it just fine. However now we are encountering very large .dbf files - like 2GB +. And this code throws an OutOfMemoryException on those files.
Public Function GetData() As DataTable
Dim dt As New DataTable(Name)
Dim sqlcommand As St...
Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file?
A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.N...
I have been debugging this query for the last 40 minutes, and the problem apparently is the order of the parameters after all.
SELECT * FROM tblSomeThing WHERE id = @id AND debut = @dtDebut AND fin = @dtFin
Then I add the parameters this way, notice that the two last parameters are switched, I get no results.
cmd.Parameters.Add("@id"...
I need to store key-value pairs in a database, where key is either e.g. a string, and value can be one of multiple types (integer, string, float/date, GUID, BLOB). The Database is accessed through OLE DB, so I want need to stick to "normal" types.
They keys might be involved in "exists" queries, values are not involved in queries (i.e. ...
I'm using the following code to work out the next unique Order Number in an access database. ServerDB is a "System.Data.OleDb.OleDbConnection"
Dim command As New OleDb.OleDbCommand("", serverDB)
command.CommandText = "SELECT max (ORDERNO) FROM WORKORDR"
iOrder = command.ExecuteScalar()
NewOrderNo = (iOrder + 1)
If I subsequently creat...
I am trying to lock a record from a .mdb with OLEDB using .NET. How do I do that?
How can I lock an entire table as well?
...
Is there any way in VSTO (/JET OLEDB or other methods of reading excel files) to tell if the data comes from a single cell or merged range of cells and get this range ?
...
Hi,
I'm needing to import an Excel spreadsheet into my program and have the following code:
string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;IMEX=1;HDR=NO;""", MyExcelFile.xls);
command.CommandText = "SELECT * FROM [Sheet1$]";
(Note, code above isn't real cod...
I am looking for advice. I know stackoverflow likes "answerable" questions, I hope this is.
I have a large legacy (Windows) application, using a proprietary (ISAM) database. I wish to investigate moving it over to using a SQL database: primarily MS SQL Server, I wouldn't mind Oracle flexibility but that is only a "would be nice", and ...
SQL Server 2008 Linked Server and ad-hoc INSERTs cause a rapid memory leak which eventually causes the server to become non-responsive and ends with the following error:
Msg 701, Level 17, State 123, Server BRECK-PC\SQLEXPRESS, Line 2
There is insufficient system memory in resource pool 'internal' to run this
query.
Location: q...
We are occasionally seeing this error:
Cannot open database ''. It may not
be a database that your application
recognizes, or the file may be
corrupt.
This is a Winforms .NET 2.0 product on a Jet/Access DB using Oledb connections.
This error occurs only intermittently. Make the same request a couple of minutes before/after ...
I am using OleDB to connect to an excel file using this connection string
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0 Xml;HDR=YES"""
But when I do this (which is inside a TransactionScope())
using (OleDbConnection conn = new OleDbConnection(connectionString))
{
conn.Open();
...
}
I g...
Hello,
is there an alternative way to query the WDS (windows desktop search) without using OleDbConnection. If yes, is this way more comfortable...
Having to know the colums (SELECT * is not working) and other weird problems let me wish for a "nicer" way, perhaps I am missing something. If not I will have to lern OleDb a little bit mor...
I am using an ExcelProvider with Microsoft.Jet.OLEDB.4.0 and am getting the Cannot Find Installable ISAM from the production machine. Windows Server 2003.
I've searched and search for this download. I've Office installed on the Dev machine, so I'm sure that's why it works fine on my end. But I can't install Office on the Production m...
ader doesn't show the first row of xls file, selected with select * from [sheet$].
Probably some inner excel row properties could affect oledb visibility?
...
I read/update data from MS Access using C#.
My code is:
public static void UpdateLastLogin(int userid, DateTime logintime) ///logintime = DateTime.Now
{
string sql = @"UPDATE [Customers] SET [LastLogin]=?";
OleDbParameter[] prms = new OleDbParameter[] {
new OleDbParameter("@LastLogin",logintime)
};
using (DAL dal =...
I am trying to figure out how to read/write lock a CSV or XLS file when I read it as a Database via Jet OLEDB.
The following code will open a CSV as a DB and load it into a DataTable object:
private DataTable OpenCSVasDB(string fullFileName)
{
string file = Path.GetFileName(fullFileName);
string di...
Hello,
I have an error while running a SSIS package:
DTS_E_OLEDBERROR. An OLE DB Error has ocurred.....
"Could not find stored procedure sys.sp_FuzzyLookupTableMaintenanceInstall"
I connect to to my db and I´m able to find the stored procedure.
sp_FuzzyLookupTableMaintenanceInstall
sys assembly stored procedure 2008-11-24 14:23:08.9...