oledb

Insert multiple rows in access database using oledb parameters

[亡魂溺海] 提交于 2019-12-11 09:49:09
问题 I am trying to insert multiple rows in a listitems to a database using parameters. But it won't give me any errors, and also won't insert any data in the table. does anyone have any ideas on this one? strSQL = "insert into tbltrans2 (transid,itemcode,itemname,qty,price,[total],btw) values ( ?,?,?,?,?,?,?)" Using cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\\POS.mdb"), _ cmd As New OleDbCommand(strSQL, cn) cmd.Parameters.Add("?",

Reading excel data when the file is open

我是研究僧i 提交于 2019-12-11 09:42:50
问题 Few days back I asked a question but could not find enough answers. I analyzed the problem a bit more and decided to create a new thread. If I should have not, let me know or close the question. I have an OPEN excel file with a column in Date format with some values like 6/22/2006, 6/22/2006. I am trying to read the excel using OleDbDataReader. The code is like this: string sql = string.Format("SELECT * FROM [{0}]", excelSheetName); internal OleDbCommand command = new OleDbCommand(); command

Reading one & Update some other Excel with c#

别来无恙 提交于 2019-12-11 09:03:36
问题 I am developing a small winform utility to read one excel & update other excel. I am trying to read source excel file (which has several hidden columns & rows) using OLEDB. I am able to do it and get output in Datatable but facing few challenges below: Sheet has columns with numbers, dates and string. After reading through OLEDB, all numbers get converted to dates or vice versa. I don't want this to happen. I have read several solutions like setting IMEX to 1 in connection string but nothing

Issue while loading date parameter in DB2 query in ssis

删除回忆录丶 提交于 2019-12-11 08:54:49
问题 I have a DB2 query that takes date parameter as input. for some reason, it throws error saying Numeric Value out of range . Date value - 2018-05-21 17:33:56.2463440 little bit of query - Snapshot from SSIS " SELECT LPAD(i.abc, 13, '0') AS abc, LPAD(i.abc,9,'0') AS abc, b.abc, i.abc, i.abc, i.abc, i.abc, i.abc, i.abc, i.abc, i.abc, sd.abc FROM abc.abci LEFT OUTER JOIN abc.abc b ON i.abc= b.abc, abc.abc f INNER JOIN abc.abc v ON i.abc= v.abc ,abc.abc md, abc.abc sd WHERE i.abc= 'A' AND i.abc=

Problem with unregistered Jet 4.0 on Windows 7 64 bit

微笑、不失礼 提交于 2019-12-11 08:54:42
问题 I am trying to run a program, running on the hard drive, that uses Microsoft Jet OleDB to open and get info from an MS Access database. The problem is that when I try to run the program Visual Studio gives me this error: "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." I tried building the program to target "x86" instead of "Any CPU", but that did not work. I also looked in the Windows\SysWOW64 folder (the 64 bit equivalent to Windows\System32 folder on a 32

ADO with XLSX files in Delphi XE

一曲冷凌霜 提交于 2019-12-11 08:47:42
问题 The issue here is ADO connection with Excel - is this still the standard way to read/write excel files within a Dephi XE environment? We're coming up with multiple issues when reading/writing using the ACEOLEDB driver (ACE 12) and this includes Reading cells with hashtags don't return results "Invalid Floating Point" when exporting grids. We've also noticed that there's many versions of the ACE 12 driver out on Microsoft's website (via Access Database driver executables) and they each seem to

How to check if a record exists in an Access database

无人久伴 提交于 2019-12-11 08:46:48
问题 I'm trying a new approach for a project that I'm working on and I'm just starting to learn about Access Databases. I using VB.net and my question is: How do you see if a record exists in the table of the database. I thought I had it understood but that is not the case. I'm creating a login and I want it to check if the Username that they typed in exists before it tries to compare what you typed with what's in the database. I see alot of questions on how to do this...but not for VB.net and MS

“Data source name not found and no default driver specified” connecting mysql

不羁岁月 提交于 2019-12-11 08:43:48
问题 Due to some technical reasons, I had to change my database from sql server to MySQL. But I am getting the following error, I cannot connect to the database..! Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Set ObjConn = CreateObject("ADODB.Connection") ObjConn.Open ("DRIVER={MySQL ODBC 5.0.96 Driver};SERVER=68.128.172.38;DATABASE=xxx;UID=xxx;PWD=xxx") 回答1: here you go with a sample

OLEDB - C++ - ATL's OLEDB Provider sample crashes Excel (uncaught exception from msado15.dll)

微笑、不失礼 提交于 2019-12-11 08:37:58
问题 I have compiled the Sample OleDb Provider code which comes from running the VS2007 ATL OLEDB Provider wizard. I have given fuller details on that blog post. The code crashes Excel. Sub TestOleDbProvider() On Error GoTo ErrHand Dim cn As ADODB.Connection Set cn = New ADODB.Connection cn.Open "Provider=FindFiles;Server=foo;Database=bar" '* this works Dim cmd As ADODB.Command Set cmd = New ADODB.Command Set cmd.ActiveConnection = cn '* this works cmd.CommandText = "*.*" '* this works Stop Dim rs

MS Access Oledb column properties

社会主义新天地 提交于 2019-12-11 08:33:43
问题 And I solved this problem in VBA using DAO here Using the Oledb framework, I created a function that can look up a record value. However it only gets the raw value. I need to find the value of the column property called "Row Source" Can someone explain to me how to find the foreign key value using Oledb Below is my function for a traditional look up query. string IDatabase.LookupRecord(string column, string table, string lookupColumn, string lookUpValue) { OleDbCommand cmdLookupColumnValue =