oledb

Application vanishes when trying to invoke an OLEDB provider with VB6 Form

我怕爱的太早我们不能终老 提交于 2019-12-12 21:18:58
问题 I have to use an OLEDB provider (for Sungard Investran) from my crystal reports in Winforms Application. Using .Net 4, Crystal Reports for VS2010. The OLEDB Provider has a Parameters Dialog, which I believe is developed in VB6. When I call this OLEDB provider with Queries without any Parameters, it works fine. But when calling any Query with Parameters, the entire application just vanishes. Everything Works fine on Windows XP but has this issue in Windows 7. The app is compiled for x86

How can I retrieve column descriptions from an access database in C#?

跟風遠走 提交于 2019-12-12 15:24:01
问题 I am trying to retrieve column descriptions for MS Access columns using C# (the text entered by the user in the table designer to describe the purpose of a column). How does one go about this? I thought maybe ExtendedProperties in the Column would hold this but when I get a DataTable through an OleDbConnection and loop through the columns, ExtendedProperties always has a count of 0. EDIT: Thanks, Remou, that did the trick. Below is a quick test in C# Catalog cat = new ADOX.CatalogClass();

Using OleDB to read excel file in c#?

℡╲_俬逩灬. 提交于 2019-12-12 12:36:00
问题 I am building a program to read excel file into dataGridView. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data; using System.Data.OleDb; namespace pro1._0 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { string sConnecStr = "Provider=Microsoft.Jet.OLEDB.4.0;"

DataTable.Merge and DataTable.ImportRow does not change RowState

依然范特西╮ 提交于 2019-12-12 10:51:34
问题 I am having issues with ADO.NET 2.0 merging/importing data. I need to update/insert data from one generic table to another table with both tables maintaining an identical schema. The following code works great locally, but does not make changes to the database: OleDbDataAdapter localDA = loadLocalData(); OleDbDataAdapter hostedDA = loadHostedData(); DataSet dsLocal = new DataSet(); localDA.Fill(dsLocal); DataSet dsChanges = new DataSet(); hostedDA.Fill(dsChanges); dsLocal.Tables[0].Merge

Very slow connection to SQL Server 2005 only if using ADO.NET with SqlClient

怎甘沉沦 提交于 2019-12-12 10:26:41
问题 I have a brand new server with Windows 2008 Server 64 bit + SQL Server 2005 Standard Edition SP3. When I try to open a connection to this server from a client in the same domain (Windows XP, .Net 3.5), it takes around 20 seconds to open the connection. After opening the connection, everything is fast as usual. When using a MDAC 2.8 connection, or ADO.NET OleDb, there is no problem at all. How can I find the reason for the slow connection? 回答1: The problem was the firewall running on the

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine though Microsoft.ACE.OLEDB.12.0 is installed

本秂侑毒 提交于 2019-12-12 09:23:12
问题 I get the following exception 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine though I have installed 'Microsoft.ACE.OLEDB.12.0' In my local dev machine I have also office 2010 What is wrong? 回答1: If you system is 64 bit,Then you have to change your pool settings to allow 32 bit applications that is OLEDB. ,then this link might help. http://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx 回答2: refer posts it was

multi-sheet import with oledb netting “_xlnm#_FilterDatabase” as sheet names

老子叫甜甜 提交于 2019-12-12 07:18:47
问题 i have an excel with multi-sheets that i want to import the code is fairly simple and basic and should work but my sheetnames keep coming back as "_xlnm#_FilterDatabase" in the debugger and is the root of my prob here is the relevant portion of the code: string sheetName = ""; file = HostingEnvironment.MapPath("~/files/master1.xlsx"); xConnStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + file + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";"; using (OleDbConnection

Left Join on Longest Match

烂漫一生 提交于 2019-12-12 07:03:42
问题 As context I am running a SQL query in VBA using ACE OLEDB. The intent of the query is to match dial codes with their destination country. The difficulty is that the match is done not on all digits but to the country code that has the most left matching digits. For example for dial code '7708' it should match to country code '77' (Kazakhstan) but my current code also pulls in '7' (Russia) to the results. Current query is as follows: SELECT TRIM(STR(bcr.DialCode)) as DialCode, bcr.Destination,

SQLiteDataAdapter Fill exception

三世轮回 提交于 2019-12-12 05:18:03
问题 I'm trying to use the OleDb CSV parser to load some data from a CSV file and insert it into a SQLite database, but I get an exception with the OleDbAdapter.Fill method and it's frustrating: An unhandled exception of type 'System.Data.ConstraintException' occurred in System.Data.dll Additional information: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Here is the source code: public void InsertData(String csvFileName,

Oledb, crash if DB path have spaces… C#

拥有回忆 提交于 2019-12-12 05:16:44
问题 I have a problem that I thought someone may be able to help me with, I have a C# application that uses a Access-database. If my path is without spaces like "C:/Test/db.accdb" it works like a charm, but if the path got spaces like "C:/Test folder/db.accdb", not so much... does anyone know why this is? my code looks like this: (The query is just an example, you get the point :) String connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dbPath; OleDbConnection connection = new