Quote:
Originally Posted by
AlexanderBB
...wanted to use VB to have a standalone .exe I could give to someone else. My next big hurdle will be to see if the table can also be included and compiled with the .exe.
A stand-alone VB executable is not possible, whatever you do you will need some extra files (but you might get lucky, and find that the user has them already). There is more info in the article Why doesn't my program work on another computer? from our Classic VB FAQs
What you should do is create some sort of installer for your program, which can also contain your database (trying to put the database into the actual executable will waste lots of time, and totally fail in most situations).
Quote:
Si, I didn't get the tutorial running, but did find something else explaining how to use the Data Control and I could connect (bind?) that to a label and see the data using the arrows to move around.
That's impressive - you've managed to find a tutorial from 1997 (when VB5 came out), which was out of date in 1998 (when VB6 came out). Either that, or it was written by somebody who has been giving bad advice on what to use.
If you look at the help for the (DAO) data control, you will see that it explicitly says not to use it - it was only included for backwards compatibility.
Quote:
But I could not 'get' the data into a variable, to then use .additem and populate the combo box.
That is one of the joys of binding.
Quote:
No matter, I changed plans to ...
That is better, because you are using code... but it is still DAO.
Quote:
Doesn't mean much to me. In Access I use
Dim db As DAO.Database
Set db = CurrentDb
Dim r As DAO.Recordset
because I was told to. Prior to that it worked without the DAO prefix.
The prefix is important because it without it you can get bugs and errors - because VB doesn't know which kind of Recordset you intended (DAO / ADO / etc), and if it gives you the wrong one at some point then there will be problems with the other code that uses it.
Quote:
Maybe ADO would work too?
It would work.
Quote:
Any advantages aren't obvious.
DAO has been seriously out of date for many years (there have been no updates etc for about 10 years), and it fails in many situations - such as with 64-bit versions of Windows.
If you like having 'random' errors that cannot be solved, stick with DAO.
If you would prefer to use technology that is still current (and still being supported), use ADO. There are various extra features, but nothing dramatic in terms of the basics for a single-user database (just things that save you development time for things like copying data to an array).