oledb

Efficient way to bulk insert into Dbase (.dbf) files

百般思念 提交于 2019-12-04 03:31:56
问题 Im currently using OleDBCommand.ExecuteNonQuery (repeatedly called) to insert as much as 350,000 rows into dbase files (*.dbf) at a time from a source DataTable. I'm reusing an OleDbCommand object and OleDbParameters to set the values to be inserted each time when the insert statement is called. Inserting 350,000 rows currently takes my program about 45 mins. Is there a more efficient way to do this? Does something similar to the Bulk Insert option used in SQL Server exist for Dbase (*.dbf)

Gathering data from Access database

烂漫一生 提交于 2019-12-03 23:07:07
问题 I want to gather some data from some tables of an Access Database, I've found some solutions online, but I haven't found ways to fill a datatable, or dataset, and get each single field properly. Is it easier for me to get whole tables then get just the info that i want, or should I make a lot of searches in the access DB getting just what i Want each time? Any code snippets for it? info: The Access Database is in an ACCDB file, with no user or password I'm currently using VB.NET, but it doesn

Microsoft ACE OLEDB connection creating empty Excel when there are 166,110 rows

一笑奈何 提交于 2019-12-03 22:14:19
问题 I am programming in C# and using an oledbconnection . This is the standard connection string e.g. using (OleDbConnection conn = new OleDbConnection( "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + saveFilenameAndLocation + ";Extended Properties='Excel 12.0 Xml;HDR=Yes'" )) This works successfully and creates my Excel spreadsheet full of the correct data, when the number of rows isn't excessive. However, whenever the number of rows in the spreadsheet increases to a large size (e.g.

Reading Excel-file using Oledb - treating content of excel file as Text only

两盒软妹~` 提交于 2019-12-03 20:54:20
I am using C# and OleDb to read data from an excel 2007 file. Connection string I am using is: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1"; Following is the code to read excel: private OleDbConnection con = null; private OleDbCommand cmd = null; private OleDbDataReader dr = null; private OleDbDataAdapter adap = null; private DataTable dt = null; private DataSet ds = null; private string query; private string conStr; public MainWindow() { this.InitializeComponent(); this.query = "SELECT * FROM [Sheet1$]";

Is there a difference in the underlying protocol for ODBC, OLEDB & ADO.NET

五迷三道 提交于 2019-12-03 19:36:21
问题 When communicating to a SQL Server database using one of the typical systems, ODBC, OLEDB or ADO.NET, is the underlying basic protocol the same? Are all the differences between these systems basically just client side issues? Is this all just different flavors of TDS (Tabular Data Stream) transfer? [MS-TDS]: Tabular Data Stream Protocol Specification Or there actual different ways to talk to the database server and there are fundamental difference between these protocols? 回答1: ODBC, OLE DB

What are the differences between OLEDB/ODBC drivers when connecting to SQL Server?

社会主义新天地 提交于 2019-12-03 17:47:47
问题 I have an SQL Server database, and I need to push data into it through vbscript, as well as pull data into Excel. I have found multiple connection strings, but no repository for the benefits of performance and functionality comparing them. The driver options ( Provider= ) I have found so far are: {SQL Server} (ODBC) SQLOLEDB (newer than ODBC, but being deprecated?) SQLOLEDB.1 (what Excel 2016 uses when clicking 'Get External Data', but not even mentioned on connectionstrings.com... I assume a

How do I query raw data from a Proficy Historian?

亡梦爱人 提交于 2019-12-03 16:34:01
问题 How can I retrieve raw time-series data from a Proficy Historian/iHistorian? Ideally, I would ask for data for a particular tag between two dates. 回答1: There are several different sampling modes you can experiment with. Raw Interpolated Lab Trend Calculated These modes are available using all of the following APIs. User API (ihuapi.dll) SDK (ihsdk.dll) OLEDB (iholedb.dll) Client Acess API (Proficy.Historian.ClientAccess.API) Of these the trend sampling mode is probably what you want since it

How to read an .XLSX (Excel 2007) file using ADO.NET? I am finding “Could not find installable ISAM”-error

旧城冷巷雨未停 提交于 2019-12-03 15:32:52
I need to work in .net 2.0 . So I can't use OpenXML. This is my source code and I have already Installed AccessDatabaseEngine.exe . But still getting the exception: "Could not find installable ISAM". I have also tried "Extended Properties=Excel 8.0" in the connection string. static void Main(string[] args) { DataSet dataSet = new DataSet(); OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|Data Directory|\HSC.xlsx;Extended Properties=Excel 12.0;HDR=YES;"); OleDbDataAdapter dataAdapter= new OleDbDataAdapter("select * from [Sheet1$]", connection);

What is the difference between ODBC and OleDB?

馋奶兔 提交于 2019-12-03 13:08:11
I found this question here: OLEDB v/s ODBC Which gave me more information, but did not really answer the question I'm asking, so I shall proceed from there. I am working in C#. I'll spare you the long story about how I arrived at this conundrum, but basically I'm trying to decide between ODBC and oleDB. We work with a lot of different clients who have vastly varied Databases (some SQL, some oracle, some something else that I've never heard of and didn't bother to remember the name of) Now, from what I understand, ODBC is old, and was/is the standard. And now OleDB has come along and... is...

how to resolve DTS_E_OLEDBERROR. in ssis

☆樱花仙子☆ 提交于 2019-12-03 11:25:36
In an ssis package consists of data flow task,contains OLEDB source and OLDB Target ..provider is sql native client..This used to run fine ..but now got an error as shown below.. Please tell me how to resolve it ?changing it to ado.net? OS :windows 7 professional and the db is sql server 2000 [Axe_Data [737]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Communication link failure". An OLE DB record is available. Source: "Microsoft