oledb

Dynamically change database type, source etc in Crystal Reports (for Visual Studio 2012)

删除回忆录丶 提交于 2020-01-01 19:57:06
问题 I've researched many different ways of how to dynamically change the datasource connection here on StackOverflow. I used and verified almost every c# and vb.net example I could find, but somehow things won't work out as they should. The idea of our project is to change the datasource connections from the old reports - that are using an xBase dll - to crdb_ado.dll with the VFPOLEDB-provider to connect to Visual Foxpro DBF files (each file representing one table). I've downloaded the latest

Microsoft.Jet.OLEDB.4.0 - Provider can not be found or it may not be installed

戏子无情 提交于 2020-01-01 09:54:06
问题 I have created an Excel Macro in which I have used Microsoft.Jet.OLEDB.4.0 to fire query on Excel work sheets. It's working perfect on my machine but my client is facing issue with it. (see the attached screen print) Here are details for my Connection Object: Dim cn Set cn = CreateObject("ADODB.Connection") With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=" & ThisWorkbook.FullName & "; Extended Properties=Excel 8.0" .Open End With Please Note: It is must for me

Reading A Fixed Format Text File

柔情痞子 提交于 2019-12-31 07:45:29
问题 Its been years since I have had to attempt to read a file using either Microsoft Text ODBC Driver or Microsoft Jet OLE DB 4.0 Provider. So I have the following code public void Example() { string CVS = Application.StartupPath; string SQL = "SELECT * FROM [MyFile.txt]"; string Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+CVS+";"+"Extended Properties='text;HDR=Yes;FMT=Fixed;"; OleDbDataAdapter OLE = new OleDbDataAdapter(SQL,Connection); DataTable Table = new DataTable(); OLE

OleDB Read Excel decimal value

廉价感情. 提交于 2019-12-31 06:01:23
问题 I am using OleDB Ace 12 to read an Excel (xslx) sheet containing a column with decimal values. When I open the Excel sheet on my PC a decimal value is correctly formatted as 1.850,50 (NLD culture with comma as decimal separator) When I'm reading out the Excel sheet using OleDB (C#4.0), the string value of this field is always 1,850.50 (US format) I've tried setting the Locale of the DataSet I fill, set the currentthread's culture and more, but the DataSet filled with OleDB adapter always

OleDB Read Excel decimal value

♀尐吖头ヾ 提交于 2019-12-31 06:01:04
问题 I am using OleDB Ace 12 to read an Excel (xslx) sheet containing a column with decimal values. When I open the Excel sheet on my PC a decimal value is correctly formatted as 1.850,50 (NLD culture with comma as decimal separator) When I'm reading out the Excel sheet using OleDB (C#4.0), the string value of this field is always 1,850.50 (US format) I've tried setting the Locale of the DataSet I fill, set the currentthread's culture and more, but the DataSet filled with OleDB adapter always

Get column name from excel worksheet

自古美人都是妖i 提交于 2019-12-31 04:50:14
问题 In C#, how do I get the column name from a worksheet in an Excel file? Here is my code so far: ConnectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";", "@"C:\file.xlsx"); objConn.Open(); OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM ["xlWorksheet"$]", objConn); OleDbDataAdapter objAdapter1 = new OleDbDataAdapter(); objAdapter1.SelectCommand = objCmdSelect; DataSet objDataset1 = new DataSet();

sqlbulkcopy from Excel via ACE.OLEDB truncates text to 255 chars

天大地大妈咪最大 提交于 2019-12-31 04:33:08
问题 Pretty straight-forward import using SqlBulkCopy: string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1;\""; using (OleDbConnection excelConnection = new OleDbConnection(excelConnectionString)) { excelConnection.Open(); OleDbCommand cmd = new OleDbCommand("Select " + fileID.ToString() + " as [FileID], * from [Sheet1$] where [Text] IS NOT NULL", excelConnection); OleDbDataReader dReader = cmd

How in .Net do I Import Values from a CSV in the format I want using OleDB?

狂风中的少年 提交于 2019-12-31 01:49:08
问题 I have a CSV file that has a column that contains strings that look like integers. That is they should be dealt with as strings, but since they are numbers they appear to be imported as integers (dropping off the leading zeroes). Example Data: 0000000000079 0000999000012 0001002000005 0004100000007 The problem I'm seeing is that the last example data point comes through as DBNull.Value. I'm assuming this is because OleDB is treating that column as an integer (the data points come through

Undefined function 'Replace' in expression

感情迁移 提交于 2019-12-31 01:46:10
问题 I am having a VB.Net application. I connect it with a MS Access database. Now I have to execute a query. My query is : Update table1 set field1=replace(field1,'|','"') This query seems to work fine from the query analyzer of the Access database but when I do the same form the VB.Net code it throws me an error stating "Undefined function 'Replace' in expression" I am using OLEDB connection and command. I am using the "executenonquery" feature. Can any one help me? 回答1: Unfortunately when you

Can I register/install Search.CollatorDSO.1 manually

删除回忆录丶 提交于 2019-12-31 00:43:08
问题 I'm currently trying to search through some indexed files using the windows.search service. My problem is that windows search cannot be installed on the web server because its a 'web edition'. Error message received is: Search.CollatorDSO.1 provider is not registered on the local machine However the index that I'm searching is on another server which does have windows search installed and I'm querying it remotely. This was all working fine in development but only because I have windows.search