Using OLEDB to download a file with Excel 2016

my application basically accepts an excel file and uploads data to my database which used to work perfect with Excel 2010 with the below code. However we update the system to Excel 2016 and it stopped working for some reason, could you please assist

OleDbCommand does not return results vs SqlCommand

I'm trying to change my program from an SqlConnection to an OleDbConnection but I've hit a little block. My program works as expected using SqlConnection but I can't get it to work with OleDb. My program reads the results of a stored procedure (XML),

update the data using oledb in C #

I made a project using c# and data base using access accdb and connected between them both. I made 2 buttons, first one to add new costumer, which works perfectly, and second one to update the data of the costumer (first name and last name), for some

OleDb regular expression

What I am trying to do is select all rows which have years beginning with 19 or 20, i.e.1997 or 2010, the other criteria works ok i.e.MY%. I have used this [F1] like '%19%' or [F1] like '%20%' but it's not ideal as it picks up things like L319. I was

c # OleDbConnection csv to excel jump the first line of csv

When using this code for some reason it skips the first line of the csv file, which are the headers. What am I doing wrong? string strFileName = path; OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source = "

oledb can not connect

Want to connect to a .mdb file in the App_Data folder. Connection string: "Provider=Microsoft.JET.OLEDB.4.0;data source=|App_Data|\\abcd.mdb" Receive error: Not a valid file name. When adapter tries to fill the dataset. Tried foreslash, backslas

Add a large number of rows using SQL

My code works well when I'm adding less than 30 rows. But It can't handle more than that. How can I overcome this? I get this error:Unspecified error when I'm trying to add less than 30, all the rows are added. and when I'm trying to add more than 30

Postgis - Migrate the table with geometry column to SQL Server

I have a table in a PostGIS database with a geometry column, assume the table called roadpublic just has 2 columns as follows: COLUMN roadid uuid; COLUMN geom geometry; Now, I'd like to import this table into a SQL Server (2012) database using the Po

I did not close previous DataReader, but where?

I have changed my previous code so I am not using 'using'. It work earlier, and code in different class basically represent the same thing, but its working. I have stared at it for 2 hours now and I just can't figure out where the problems might be.

SQL parameter for ALL

I was wondering if there was a parameter in SQL for all (not *!) For example, I'm writing a search table now, and if the user does not input something in the text box, it would mean to ignore that specific parameter and display ALL of them for that f

Problem with OleDbConnection, Excel, and connection pooling

So, I have the same symptoms as described in C#/ASP.NET Oledb - MS Excel read "Unspecified error", but my my answer did not seem to fix it. Even always closing the OleDBConnection and disposing of it show the same symptoms. var connectionString

Oledb connection string for Excel files

This is the oledb connection string I'm using while loading excel 2003 files. But I'm getting the error could not find installable ISAM`.' Please help me in this issue. What I'm doing wrong here. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\FileUp

Insert rows in Access Table in c # order

I have a sorted list of insert statements that I am trying to write to an Access db. I have triple verified that the list of insert statements is in the correct order. When I open the mdb file the records are never in order. Maybe for the first 100 r

Need to solve this error

Using Oledb to connect to an MS Access DB. I get the following error when the Open Function of the OleDbConnection class is called "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."I guess your OS 64-bit but Microso

Excel ODS Query Returns Incorrect Column Names

When retriving Excel sheet Named region it returns spurious column names OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "No value given for one or more required parameters.". Msg 7320,

Access the Windows Search Index Using ASP.NET MVC

I'm on a project that is being upgraded from vbscript to ASP.NET MVC. It used Microsoft Index Server to index Word and PDF files on a Windows Server 2003 machine. It simply opened an OleDbConnection using a connection string like "Provider=\"MSI

OleDbParameters and parameter names

I have an SQL statement that I'm executing through OleDb, the statement is something like this: INSERT INTO mytable (name, dept) VALUES (@name, @dept); I'm adding parameters to the OleDbCommand like this: OleDbCommand Command = new OleDbCommand(); Co

Update Excel 2007 with OleDb

Attempting to execute an update command against an Excel 2007 file gives the error: Operation must use an updateable query. I'm using System.Data.OleDb with a connection string like this: Dim strConn As String = "Provider=Microsoft.ACE.OLEDB.12.0;&qu