oledb

OleDbCommand parameters order and priority

岁酱吖の 提交于 2019-11-26 01:02:13
问题 I have been debugging this query for the last 40 minutes, and the problem apparently is the order of the parameters after all. SELECT * FROM tblSomeThing WHERE id = @id AND debut = @dtDebut AND fin = @dtFin Then I add the parameters this way, notice that the two last parameters are switched, I get no results. cmd.Parameters.Add(\"@id\", OleDbType.Integer).Value = idSociete; cmd.Parameters.Add(\"@dtFin\", OleDbType.Date).Value = dateTraitementFin; cmd.Parameters.Add(\"@dtDebut\", OleDbType

Microsoft.ACE.OLEDB.12.0 provider is not registered

旧街凉风 提交于 2019-11-26 00:33:34
问题 I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing). Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb. In the database project I have a function which retrieves a data table as follows private class AdminDatabase \' stores the connection string which is set in the New() method dim strAdminConnection as string public sub New()

OleDB & mixed Excel datatypes : missing data

给你一囗甜甜゛ 提交于 2019-11-25 22:31:30
问题 I have an Excel worksheet I want to read into a datatable - all is well except for one particular column in my Excel sheet. The column, \'ProductID\', is a mix of values like ########## and n######### . I tried to let OleDB handle everything by itself automatically by reading it into a dataset/datatable, but any values in \'ProductID\' like n###### are missing, ignored, and left blank. I tried manually creating my DataTable by looping through each row with a datareader, but with the exact