oledb

How do you get a list of MS Access data types?

你说的曾经没有我的故事 提交于 2019-12-13 06:32:13
问题 I am trying to list data types from Microsoft Access 2000-2007 (depending on the MS Access database version) in a combobox for a C# program. How can I achieve such a thing? 回答1: I don't think it is possible to interrogate the engine at run time to enumerate the data types it supports. For example, DAO will not reveal some of the Jet 4.0 data types such as NCHAR and BINARY ; ADO will reveals data types that the Access database engine has never supported; only ACEDAO will reveal multivalued

Export SQL DataBase to WinForm DataSet and then to MDB Database using DataSet

我与影子孤独终老i 提交于 2019-12-13 06:13:22
问题 My application is a winform app that relies on a database. At startup of the application it connects to an SQL Database on the server and put this information in a DataSet/DataTable. If for some reason the database on the server is not accessible, the application has a built in failover and it will get its information from the local database. If, in a normal scenario, I start the tool it will read from the sql database and if it has been updated on the server (a seperate snippet checks this),

How to get database notification to C++ application

大憨熊 提交于 2019-12-13 06:03:46
问题 We are developing a C++ server which will process based on time based events. For example if a particular user has configured a particular task that has to be processed at a particular time, then an event or notification needs to be sent to the C++ server from the database, to initiate the task. The timming configuration is stored in the database, and the C++ server shouldnt poll the database at an interval, but event should be notified from the database at the configured timming. We are

Database Date/Time comparison does not yield expected result?

非 Y 不嫁゛ 提交于 2019-12-13 05:29:54
问题 I am having a problem with C# and MS Access, where I expect the following call to return one record: c = Shift.Get(ProfileID, Start, null, null, null, null, null, null); Where Start is "1/7/2015 3:30:00 PM" and ProfileID is "******16732" and the method is: public static ObservableCollection<Shift> Get(string profileID, DateTime? start, DateTime? stop, string fullName, bool? closed, bool? archived = null, Database db = null, string sort="ASC") { OleDbCommand cmd = new OleDbCommand( "SELECT

Shall I read an excel file via OleDb Jet4.0 and save into dataset?

六月ゝ 毕业季﹏ 提交于 2019-12-13 05:18:16
问题 I have to read an excel file and put into a dataset. Shall I read excel file content via OleDbDataAdapter, and then Fill into a dataset? I tried but faild. It said the application cannot recognize database format when data adapter is doing Fill method. Code: String queryAll = "SELECT * FROM [Sheet1$]"; String xlsPath = Directory.GetCurrentDirectory() + "\\paid.xls"; String strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + xlsPath; try { m_dbDA = new OleDbDataAdapter(queryAll,

Refresh data and exit with saving Macro Excel

拥有回忆 提交于 2019-12-13 04:59:41
问题 I need to refresh the data from ole db source while opens excel and afte that saves and exit. Here is my macro code: Sub auto_open() Call DataRefresh End Sub Sub DataRefresh() TimeToRun = Now Application.OnTime TimeToRun, "Refresh" End Sub Sub Refresh() ActiveWorkbook.Connections("Shas").Refresh End Sub Sub auto_close() Application.OnTime TimeToRun, "Refresh", , True Application.Quit ThisWoorkbook.Close SaveChanges:=True End Sub It's okay with renewing after openening but it doesnt exit. What

Updating Excel Sheet Using OleDb

孤人 提交于 2019-12-13 04:42:36
问题 I am trying to update a single cell of an Excel sheet. Note, in my example code below I am using variables for the column and row because this will change according to other parts of my program, but for debugging purposes I have set them to A and 1 respectively. Right now I am getting an error saying "Syntax error (missing operator) in query expression '06:31 PM'. Please don't simply suggest I parameterize because I know this will not fix my problem and I am not worried about injection.

OleDbException: no value given for parameters when no parameters are defined

一世执手 提交于 2019-12-13 04:32:21
问题 I'm encountering an OleDbException whilst running tests on an application I'm developing. The error message given is, 'No value given for one or more required parameters.' I know this question appears to have been asked several other times on this site, but in each of the cases the problem arises whilst executing an UPDATE command. My errors are being thrown in my SELECT command; to add to the confusion, I'm not even trying to use parameters, so I'm not sure what parameters it's expecting.

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

有些话、适合烂在心里 提交于 2019-12-13 04:13:11
问题 I spent last two days trying to solve this error The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine no luck!!! :( i am running windows xp sp2 please help me i am ..,..., frustrated!! thanks 回答1: Are you running 64 Bit? Here's the latest drivers which supports it: http://support.microsoft.com/kb/239114 It took MS forever to get 64 Bit drivers for Jet 4.0. 回答2: I solved this by going to project properties | Build, and changing Platform Target to x86. 回答3: If it's the

Load Excel sheet into DataTable but only the first 256 chars per cell are imported,

做~自己de王妃 提交于 2019-12-13 04:09:47
问题 I have an excel sheet that I want to load into a datatable withe OleDb. The sheet contains a multiline text column with up to 1000 chars. However, using this code below, I only have 256 chars in my DataTable per cell after the import. Is this a limitation from the provider or is it possible to tell it to read the whole column? var connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\file.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1"";"; var sheetName = "Sheet1";