Linked Questions
12 questions linked to/from Materializing any ADODB Query
52
votes
3
answers
16k
views
List<T> implementation for VB6/VBA
Recently I decided VB6's Collection wasn't enough for my needs, so I decided to implement something like C#'s List<T>. ...
34
votes
5
answers
17k
views
Creating ADODB Parameters on the fly
I have put together a small wrapper class to simplify creating parameterized ADODB queries with VB6/VBA. At this point I'm keeping things simple, so it's only supporting input parameters and from what ...
14
votes
2
answers
2k
views
YARPI: Yet Another Repository Pattern Implementation
Following-up on this post, I wanted to be able to put a copy of that Excel workbook on a USB key and take it home to keep working on the code a bit (there's more than just one or two tables to ...
10
votes
3
answers
1k
views
A more readable InStr: StringContains
Consider the following:
If myString = "abc" Or myString = "def" [...] Or myString = "xyz" Then
In C# when myString == "abc" ...
5
votes
2
answers
5k
views
Storing recordset data
I have managed to write some pretty terrible code in VBA and I know there has to be a better way. I have made all of these variables to store some data which I eventually reference in the application. ...
5
votes
1
answer
15k
views
Passing multiple parameters to an SQL query
I am trying to use this VBA code to pass a SQL stored procedure multiple values from an excel sheet.
In order to have the procedure run multiple times and insert multiple sets of information into the ...
8
votes
1
answer
3k
views
Dictionary<TKey, TValue> Implementation
This class encapsulates a List<KeyValuePair> (see List<T> implementation here, and ...
11
votes
3
answers
412
views
Secure ADODB: Unit of Work
I've been meaning to revisit this old code for a long time, and this week finally ended up doing it. The resulting code is on GitHub, and for full context and disclosure I wrote a blog article about ...
4
votes
2
answers
273
views
Implementation of the Access version DBLookup() in VB6
I've tried to implement the access function DBLookup() in VB6 for a project I'm doing. Does anyone have comments on how well done it is and what could be improved? ...
13
votes
1
answer
1k
views
Abusing Excel VBA... to maintain data stored in a database
I need to build a little UI to allow easy maintenance of some data stored in a MySQL database, and the end user wants to do that in Excel (I know, I know).
The code I came up with comes pretty close ...
7
votes
1
answer
3k
views
Run arbitrary INSERT INTO SQL Query using parameters
While DoCmd.RunSQL is all well and good for simple code, the number of times I've run into problems with unescaped apostrophes and the like was starting to nark a ...
2
votes
1
answer
619
views
ADODB Wrapper Class
I use ADO (specifically for accessing SQL) daily at work. So, I finally decided that I was going to create a class that makes it simple for myself and other programmers on the job to use. Just the ...