adodb

How does the classic asp connection.errors collection actually work?

久未见 提交于 2020-08-19 08:42:31
问题 I am trying to confirm how the actual ADODB.Connection.Errors collection should actually work. My interpretation at the moment is that the connection will hold all the errors for the all the procedures that have been executed on that connection. So I should be able to say on error resume next ... code goes here ... 2 or more command objects execute procedures against the database on the same connection if con.Errors <> 0 then loop through all the Errors objects (1 for each procedure that

How to retrieve data from access database(.accdb) into excel using vba

让人想犯罪 __ 提交于 2020-07-15 08:20:27
问题 I'm working on Excel VBA macros and I want to retrieve data from a MS Access database ( .accdb file). I've tried using below connection string and it throws runtime error '438' Dim cn As Object, rs As Object,DBFullName As String,Target As Range DBFullName = "D:\Tool_Database\Tool_Database.accdb" Set Target = Sheets("Sheet1").Range("A1") Set cn = CreateObject("ADODB.Connection") cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & DBFullName & ";" Set rs = CreateObject("ADODB.Recordset"

SQL command terminates before reaching end of large csv file

三世轮回 提交于 2020-07-09 09:20:54
问题 I have a large csv file with lots of data that I need to be able to analysis (~6M rows). I want to connect to the file and run SQL command against it to return only the data I'm interested in analysing. The VBA I'm writing is in Excel 2010. Everything works fine when the number of rows in the csv file is < 4432669. When the csv file has more rows than this, the command seem to terminate at that point in the file and just returns what ever it has found up to that point. No Error is thrown (CN

SQL command terminates before reaching end of large csv file

天大地大妈咪最大 提交于 2020-07-09 09:20:44
问题 I have a large csv file with lots of data that I need to be able to analysis (~6M rows). I want to connect to the file and run SQL command against it to return only the data I'm interested in analysing. The VBA I'm writing is in Excel 2010. Everything works fine when the number of rows in the csv file is < 4432669. When the csv file has more rows than this, the command seem to terminate at that point in the file and just returns what ever it has found up to that point. No Error is thrown (CN

ADODB.Connection: delimiter semicolon does not work for csv text files

烈酒焚心 提交于 2020-05-28 09:48:05
问题 I use ADODB.Connection and ADODB.Recordset to get data from csv files. The problem I am facing is that the delimiter seems not to work in case of semicolon (or other than comma). I am working with a semicolon as a delimiter. This is my code: Public Function getDataFromFile(path As String, filename As String) As ADODB.Recordset Dim cN As ADODB.Connection Dim RS As ADODB.Recordset Set cN = New ADODB.Connection Set RS = New ADODB.Recordset cN.Open ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=