oledbdatareader

How to sort 30Million csv records in Powershell

流过昼夜 提交于 2021-02-11 12:50:54
问题 I am using oledbconnection to sort the first column of csv file. Oledb connection is executed up to 9 million records within 6 min duration successfully. But when am executing 10 million records, getting following alert message. Exception calling "ExecuteReader" with "0" argument(s): "The query cannot be completed. Either the size of the query result is larger than the maximum size of a database (2 GB), or there is not enough temporary storage space on the disk to store the query result." is

How to sort 30Million csv records in Powershell

此生再无相见时 提交于 2021-02-11 12:50:03
问题 I am using oledbconnection to sort the first column of csv file. Oledb connection is executed up to 9 million records within 6 min duration successfully. But when am executing 10 million records, getting following alert message. Exception calling "ExecuteReader" with "0" argument(s): "The query cannot be completed. Either the size of the query result is larger than the maximum size of a database (2 GB), or there is not enough temporary storage space on the disk to store the query result." is

DataReader does not see data in Excel cell if previous cell in the column are empty

不打扰是莪最后的温柔 提交于 2020-01-16 10:15:45
问题 I have a weird problem with reading .xls file using OleDbDataReader . Basically, it does not see a data in the cell, if the previous cells in the column are empty. If I move the row with the data at the top of Excel sheet, then everything loads fine. I'm not sure, but I think that it has something to do with the amount of empty cells before the one with data. Any help or advice will be much appreciated. 回答1: You probably have a connectionstring like this: <add name="MyApp.Properties.Settings

To which C# data type does MS Access “Number” type correspond?

雨燕双飞 提交于 2019-12-14 03:14:15
问题 According to http://msdn.microsoft.com/en-us/library/office/aa211091(v=office.11).aspx, the MS Jet database engine has no "NUMBER" data type; yet that is what I see in the MS Access design view of the table that I'm querying - that the data type of the first column I'm retrieving wit the query is of the "NUMBER" data type. I've got this code that breaks, both when I try to convert that value to Int32 and to Double: // A set comprised of two columns are returned from a query in cmd using

ExecuteNonQuery inside of Reader

旧城冷巷雨未停 提交于 2019-12-13 21:08:24
问题 How can I solve this problem? I do not want to use two connections. ExecuteNonQuery only works if reader is closed. oleCnn = New System.Data.OleDb.OleDbConnection oleCnn.ConnectionString = ConnectionString oleCmm = New OleDb.OleDbCommand() oleCnn.Open() oleStr = "SELECT ID_Process FROM MyProcessTable" Dim reader As System.Data.OleDb.OleDbDataReader = oleCmm.ExecuteReader() While reader.Read() For i = 1 To NumExecutions oleStr = "INSERT INTO MyOtherProcessTable(reader.getInt32(0))" oleCmm

Large query how to return results back in sections C#/ASP.NET MVC 4

喜你入骨 提交于 2019-12-11 04:38:28
问题 I have an application written in ASP.NET MVC 4. I have a requirement to return large results from a table accessed with oledbdatareader. I am using AJAX to return a JsonResult object that contains a List: List<TableRow> What I do not understand is, if I am in the DataReader loop using (OleDbDataReader reader = command.ExecuteReader()) { while (reader.Read()) { names.Add(Convert.ToString(reader[0])); } } Is there a way to periodically send the list object, and then create a new object to

LIKE Command Problem using OLEDBREADER and MS Access

China☆狼群 提交于 2019-12-11 03:34:15
问题 Odd one this... The following command returns what I would expect when I run it in query window in Access 2003: SELECT * FROM Train WHERE [Days] LIKE '*3*' However when I pass this into my C# code to run (returning an OleDbDataReader) I get nothing.I suspect it's something to do with the LIKE command (when I remove this I get rows). Any thoughts? 回答1: Just a guess but try this: SELECT * FROM Train WHERE [Days] LIKE '%3%' 来源: https://stackoverflow.com/questions/3193350/like-command-problem

How to make OleDb code run asynchronous?

♀尐吖头ヾ 提交于 2019-12-10 10:25:19
问题 I've seen a lot of examples for asynchronous when trying to do Web downloading/reading. But I fail to find a sample or anything for OleDb (or is there a better equivalent?), I'd like to use the new and simplified Async and Await features of C# 5.0. This is just an example of how I use OleDb now: public void insertTafelloc(int tafelnr, string datum, string tijd) { tafelsupdate = false; try { db.cmd.Connection = db.connection; db.connection.Open(); db.cmd.CommandText = "SELECT * FROM tafels

How to make OleDb code run asynchronous?

醉酒当歌 提交于 2019-12-06 03:07:00
I've seen a lot of examples for asynchronous when trying to do Web downloading/reading. But I fail to find a sample or anything for OleDb (or is there a better equivalent?), I'd like to use the new and simplified Async and Await features of C# 5.0. This is just an example of how I use OleDb now: public void insertTafelloc(int tafelnr, string datum, string tijd) { tafelsupdate = false; try { db.cmd.Connection = db.connection; db.connection.Open(); db.cmd.CommandText = "SELECT * FROM tafels WHERE tafelnr = ? AND datum = ?"; db.cmd.Parameters.Add(new OleDbParameter("1", tafelnr)); db.cmd

LIKE query on an Access database via C# always returns COUNT(*) of 0

限于喜欢 提交于 2019-12-04 01:59:54
问题 Please look into following code: using (OleDbConnection openCon = new OleDbConnection(ConfigurationManager.AppSettings["AccessConnectioString"])) { openCon.Open(); string tc = string.Empty; string ttc = string.Empty; if (!string.IsNullOrEmpty(QSetId)) { tc = "select count(*) as [Count] from ABC where QSetId = @qSetId and TText like 'RT*'"; } else { tc = "select count(*) as [Count] from PQR where TText like 'RT*'"; } using (OleDbCommand qtc= new OleDbCommand(tc)) { qtc.Connection = openCon; if