1,856 questions
1
vote
0
answers
131
views
Transferring data from one Excel workbook to another with ADODB.Connection reformats dates
I set up an event listener in Outlook that, when a certain item drops into a mailbox, will take the attachment from the email, unzip the file and save it into a directory.
I use ADODB.Connection to ...
2
votes
0
answers
152
views
Using two words in LIKE operator (eg.: %John%Doe%) VB6
TL;DR Is it possible to search for matches using two words in LIKE operator?
Eg.: rsCustomers.Filter("Name LIKE '%John%Doe%'").
I have this ADODB.Recordset called rsCustomers that persists ...
2
votes
1
answer
99
views
Convert ADODB RecordSet to a 2 dimensional array
I want to read an Excel file without openening the file and put the result in a two dim. array. For this I use the below code
Sub ReadExcelFileWithoutOpening()
Dim conn As Object
Dim rs As Object
Dim ...
3
votes
0
answers
812
views
"Not a valid password" error in Access97 database in Windows 11
In Windows 11 version 24H2,
access 97 database is frequently not read due to update of jet engine related files.
Access 97 database throws "Not a valid password" error even though there is ...
0
votes
1
answer
114
views
Can you display a SQL Server Image datatype column in Excel?
Our SQL Server stores order attachments in a deprecated Image datatype column. We currently track orders in Excel using VBA ADODB recordsets. I'm wondering if it's possible to display the actual ...
2
votes
2
answers
77
views
Excel VBA ODBC reading field changes it to Null
Summary;
The first time I read a data field, I get 0, every time after, the same record field reads Null. This changes if I debug, step through and watch the values in the locals/watchlist, I get Null ...
0
votes
0
answers
90
views
Calling a MySQL parameterised stored procedure using VBS and ADODB returns unexpected random values in the OUT parameters [duplicate]
MySQL (v5.7.44). Classic ASP using VBS, ADODB.
Not a newbie, and hoping this is not because of developing bad habits over the years, but after 3 weeks of trying this and that, I'm hoping someone can ...
0
votes
1
answer
113
views
VBA ADO INSERT INTO SQL Server - adDate not passing date
SUMMARY: I don't know which VBA data type (Date, String or ?) to store the VBA date-in that will be passed to SQL Server for insert via the ADO Parameter definition. When the ADO JDate parameter is ...
0
votes
0
answers
23
views
Recordset.Close() extremely slow following server restart
Due to a power failure yesterday, one of my servers restarted and now a web based application on that server is so slow it is unusable.
Using the Failed Request log files I have tracked the problem ...
0
votes
1
answer
52
views
How to combine information in two different cells when using ADODB to pull information from a closed workbook into a mater sheet
I have a master workbook that I am trying to import data from a different target workbook using ADODB.
I am trying to combine the information from two cells in the target workbook and input the ...
1
vote
3
answers
114
views
How to automatically have excel read the sheet name of sheet 1 of the target file when using ADODB
I am trying to use ADODB to automatically read information from specific cells on a closed workbook and put that information into a master sheet.
The closed workbooks all only have 1 sheet but they ...
0
votes
0
answers
86
views
Macro using ADODB.Connection to pull information from a cell from a closed file only works when the file is open
I am trying to write a program that extracts information from a cell in a closed excel file.
The problem is that the macro doesn't work when the target file is closed but works great when the target ...
0
votes
0
answers
27
views
How to convert a row number to a cell number (ie. Row Number = 2, so Cell Number = A2) [duplicate]
I am trying to have a program that takes information from a separate excel form and deposit that information into the next empty row.
I have a line of code that selects the next empty row, but now I ...
0
votes
1
answer
65
views
Getting a "Could not find installable ISAM" error for a program using ADODB to export information from a separate excel sheet
I am trying to write a program that you can select a closed file and have information extracted from it without ever opening it. I am not sure why I keep getting an error.
For context I had a simpler ...
1
vote
0
answers
137
views
Pass a Table-Valued Parameter (TVP) to a SQL Server stored procedure using VBA and ADO
I need to pass a table-valued parameter (TVP) to a SQL Server stored procedure from VBA using ADO.
I have a SQL Server TYPE and stored procedure defined:
CREATE TYPE dbo.MyTableType AS TABLE
(
...
0
votes
0
answers
212
views
VBA, ADO and SharePoint list : retrieving columns of type Person
I am working with VBA and ADODB to retrieve the content of SharePoint lists.
It works well but for some reason, I can't retrieve columns of type Person.
I am absolutely certain these exist in the list....
1
vote
1
answer
127
views
MS Access ADODB.Recordset Cannot Add adLongVarWChar field. Error 3001 Arguments are of Wrong Type
I am trying to add an adLongVarWChar field to an ADODB.Recordset in MS Access using the following sample code.
If I execute this sub, I get error 3001:
Arguments are of the wrong type, are out of ...
0
votes
1
answer
88
views
ADODB Recordset always shows BOF and EOF even though Recordcount > 0
I am querying the Active Directory in VBScript as follows (I deleted the group path for confidential reasons):
set objCmd = createobject("ADODB.Command")
set conn = createobject("...
0
votes
1
answer
106
views
"ADODB.Recordset: Item cannot be found in the collection corresponding to the requested name or ordinal" Error for Existing Column [duplicate]
I'm trying to execute the following SQL Query:
DECLARE @Start DATETIME
SET @Start = DateAdd(Hour, -1,GetDate())
IF OBJECT_ID('tempdb..#logTable') IS NOT NULL
DROP TABLE #logTable
CREATE TABLE #...
2
votes
0
answers
52
views
ADODB.Command with IN operator values as parameter [duplicate]
I want to create similar ADODB.Recordsets multiple times, so I thought it would be a good idea to do it with a prepared ADODB.Command. My issue now is that I want to fill the element list of an IN ...
0
votes
0
answers
36
views
Query writing out the same record for entire recordset
I have a select query in SQL Server which works fine.
When I convert it to an insert query, it stores the correct number of rows, but they are all duplicates of the first row.
Even when I write out ...
0
votes
1
answer
77
views
sql select statement in vba not pulling headers from excel closed workbook and some other values
I am working with excel workbook to pull data of my closed workbook "RawData.xlsm" sheet name "all_register". following are the code, but this vba code unable to pull all headers (...
1
vote
1
answer
66
views
How do I preserve é (e-acute) character from SQL DB to ADODB recordset to Excel through VBA?
I have an Excel VBA project that iterates through a list in a parameter table and populates data using the rows of the parameter table to provide arguments for the parameters of the SQL Query to a SQL ...
0
votes
1
answer
470
views
Excel/Vba/ADODB: how to connect to Table (ListObject) only with its name, to perform a query?
I have tried to get a solution to my problem, looking also to the past questions here reported, but I didn't find a solution.
Problem: in VBA, how I can specify the name of a Excel table, inside an ...
0
votes
1
answer
70
views
VBA read 1st line of large utf8 csv
I tried to use th ADODB to read only the first line of a large utf8 file.
for my purpose I need only the values of the first line in a csv (having the headers of a table)
Public Sub stream()
...
0
votes
0
answers
136
views
Access Violation Exception when calling ADODB connection get_state()
My C# app occurred 'Access Violation Exception' when calling ADODB connection 'get_state()'.
Not always, just once.
What does this app do is, Delete all data from a table & Insert data into the ...
0
votes
0
answers
72
views
Connection string to read recordset from a table in Microsoft WORD
In Powerpoint, I'm writing VBA code to read data from different data source files. To get data from Excel, I have no problem creating a recordset by using a connection string as follows:
With cn
....
0
votes
0
answers
57
views
Problem with trailing number using adodb to import csv file
I use adodb to import csv to sheet but i have problem with trailing minus data and it seem record set cannot recognize trailing minus and it disappear.
i want it to import negatve number but because ...
0
votes
1
answer
274
views
How to improve the processing speed for updating Sharepoint List value from VBA (ADODB)
Is there any method to improve the processing speed for updating Sharepoint List value from VBA(ADODB) ?
I've identified the part of the code that makes slower the processing speed.
It is [rs.Fields....
1
vote
0
answers
48
views
error using ADODB.Command with parameters [duplicate]
I am trying to INSERT a record into a Microsoft SQL Server table using an ADODB.Command object, from VBA.
I never used it before so I may be making stupid mistakes.
This is my code:
Sub Test_Insert()
...
0
votes
0
answers
48
views
ADO recordset returns COUNT field incorrect or syntax error in ASP [duplicate]
I'm receiving the error below once my code reaches rs.Update and I'm not sure why.
It was working on a previous server but the error started after I migrated to a newer site & sql server.
...
0
votes
1
answer
504
views
"Microsoft Access database engine cannot open or write to the file" when trying to open connection with ADODB to query .csv files
I'm trying to run SQL queries on .csv files using VBA, however when I attempt to open a connection using any directory on my local computer, I get an error
"The Microsoft Access database engine ...
0
votes
0
answers
59
views
ADODB ->numRows() or COUNT(*) $ADODB_COUNTRECS
Optimization question. There is an $ADODB_COUNTRECS parameter that makes requests immediately counting the number of lines. However, he constantly makes this request, and it is often unnecessary. I'm ...
0
votes
1
answer
177
views
VB.NET oledbDataAdapter fill work only once
So I have a recordset and I want to fill two datatable with it but it only fill the first datatable.
Dim da As New OleDb.OleDbDataAdapter
Dim dt1 As New DataTable
Dim rs1 As New ADODB.Recordset
rs1....
0
votes
0
answers
74
views
Varchar(max) causing other other accesses of the record set to return null [duplicate]
With an SQL Server table set up as
A INT
B VARCHAR(MAX)
C INT
And accessessing this in ASP Classic
set RS = oConn.Execute("SELECT A,B,C FROM Table")
RS("A") returns A
RS("B&...
0
votes
1
answer
144
views
How to disconnect recordset obtained from local table in MS Access?
I'm looking for a way to create an in-memory datasheet form. And I like the idea of using a disconnected recordset. But I ran into the problem of the app crashing after reassigning disconnected ...
0
votes
0
answers
38
views
MS Access crashes after reassigning disconnected ADODB recordset to form [duplicate]
I'm looking for a way to create an in-memory datasheet form. And I like the idea of using a disconnected ADODB Recordset. And at first glance it works. But after refreshing the form (F5 key or Refresh ...
0
votes
0
answers
60
views
Query data from excel file which is saved in sharepoint
I need some help with the code to query and retrieve the data from the excel file saved on the Sharepoint server.
The Code works fine here when i use local path
Sub ConnectToSharePointExcel()
' ...
1
vote
1
answer
159
views
Using nvarchar(max) in Azure stored procedure
We are testing moving from a local MSSQL db to Azure.
We have an old ASP classic site which we need to maintain that creates an ADODB command to store email messages using a MSSQL stored procedure. ...
0
votes
1
answer
74
views
Delete blank row from Recordset
I have a sheet with a drop down list that outputs data based on that selection. At most it's 3 rows but sometimes 1 or 2 rows, at the moment it always outputs 3 rows even if they are empty and I want ...
0
votes
1
answer
98
views
VBA SQL Select statement Concatenate
I have an Excel sheet with a drop down list of today's date + 4 days ahead, when you select a date I want to show the collections for that date, the collections are of datetime on another worksheet, ...
0
votes
0
answers
150
views
Excel file that connects to SharePoint: Could not find Installable ISAM
My company created an Excel file that connects to SharePoint for a client.
It works in my machine and in the VM of the client.
On the laptop of the client, we get this error.
Could not find ...
0
votes
2
answers
298
views
Excel crashes when attempting to open ADODB connection
I have an Excel file that is using an ADODB connection to read and write to a closed workbook. It runs on my laptop, using a locally stored file from which to read from and write to. (Office ...
0
votes
1
answer
150
views
Why is my VBA If statement throwing a Type Mismatch Error
I have a VBA function that I am building for a project and an if statement is continually throwing a Type mismatch errors. Here's the relevant code:
Dim conn As ADODB.Connection
Set conn = New ADODB....
0
votes
1
answer
965
views
Connecting to SQL db with ADODB
I am trying to connect to a SQL database with ADODB connection. I am not getting an error with my code, however nothing is populating. Can anyone advise what I may be doing wrong? thanks!
Also I'm ...
1
vote
2
answers
200
views
In VB6, ADODB.Recordset values from sql query not returning decimals
I'm fetching data from a db2 in VB6 using ODBC. The connection and setup is fine, but there's a problem in the returned data.
The fields in my record set are all rounded down to integer, so if the db ...
0
votes
1
answer
122
views
sql select record based on multiple "time" only
I get following table "myTable" in Excel.
Time
A
B
C
0:01:01
Apple
1
2
0:01:01
Banana
3
4
0:01:01
Cherry
5
6
0:02:01
Apple
11
12
0:02:01
Banana
13
14
0:02:01
Cherry
15
16
0:03:01
Apple
21
...
0
votes
1
answer
142
views
MS Access - ADODB conection issue - syntax error in FROM clause
I am migrating an App designed in Access 32 bits to Access 64 bits. I have followed all the steps defined in the Microsft website. I have managed to open it and work in most of the macros that App had,...
0
votes
0
answers
70
views
Runtime error 424 when adding parameters to ADODB Command in Excel VBA
I'm developing an Excel spreadsheet app that connects to an Access database. I'm able to query the database just fine. The problem occurs when I try to add parameters to a query - I'm getting Runtime ...
0
votes
0
answers
83
views
Data Excel loses and wrong formats when data is copied from ADODB recordset
After using ADODB recordset to paste data in Excel, some columns have lost data and some have the wrong format as below.
If SheetExists(conn, sheetName) Then
' ...