Just thought i'd attach my "An introduction to ADO" tutorial for anyone wanting to learn how to work with databases or wanting to learn how to use ADODB.
It is for beginners so it's not too complicated hopefully it's easy enough to read and understand.
It's password protected so just choose read-only when you open it.
cheers
beacon
added by si_the_geek:
Note that there are some bugs in this tutorial, you can find a corrected version of the tutorial in the thread: ADO Tutorial for Classic VB
If anyone wants to ask a question relating to the tutorial, the chances are that it has already been answered in this thread (so please read the replies!), or is in the thread ADO Beginners Tutorial, Some Further Steps.
If you cannot find an answer to your question, please create a new thread in the Database Development forum - several people who can help will read it.
Last edited by si_the_geek; Jan 28th, 2009 at 07:11 PM.
It's password protected so just choose read-only when you open it.
first read before asking!
The WiseGuy
I stuck my head out of the window and got arrested for mooning!
This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
O/S: Windows XP Professional (dutch)
Internet: Cable (1Mbit connection)
Great tutorial Beacon! You might wanna run through it with a spell check though Also, first you say that you're going to refer to the table as 'table1' then you say 'tbl_master' throughout the document.
Hiya Beacon
Loved the tutorial, was a big help.
Question I have tho, is I'm trying to make a table bigger than what access will allow me to create.
My table on my form is 20 rows deep by 10 columns wide, and each textbox in it needs a spot in the database.
You know a way around that?
Thx in advance
*by the way...something I added to yours on my own, (I was proud cuz I'm as newbie as newbie gets hehe), is that if you dont have a pre programmed database record when you go to start the project it'll come up with an error and shut down. So on Form_load I did this at the bottom....
If (rs.BOF = True Or rs.EOF = True) Then
Call Init
Else:
rs.MoveFirst 'moves to the first record
fillfields
End If
Sub Init() is where i have all my textboxes set at zero...for when a user first uses a program or is starting a new file, etc etc
Opens up fine with a record in it or not.
I've been teaching myself over the past 3 or 4 months with a few books and forums like this as I muddle my way thru my first project
Originally posted by Kracked Hiya Beacon
Loved the tutorial, was a big help.
Question I have tho, is I'm trying to make a table bigger than what access will allow me to create.
My table on my form is 20 rows deep by 10 columns wide, and each textbox in it needs a spot in the database.
You know a way around that?
Thx in advance
Hmm... I don't know if Beacon still visits this place.
AFAIK, Access has no such limits. Perhaps you're talking about the form you're creating in VB being limited by size? If such is the case, how about using a grid?
How can I submit to a different table or query, I used beacon's tutorial and I got the information from 2 different tables but now I need to submit to a different table.
Originally posted by alx100 can you also use ADO to link a database to a bar chart?
if so, what code is it/change?
thanks
A chart is a separate control (and issue). If the chart in question has a provision of working with recordsets, then you probably need to just set the recordset there.
Otherwise, it probably works off arrays, so you should store the values from your recordset into an array and then pass the array to the chart.
Don't know if this thread is still in use but there it goes anyway:
I got all my data in a dataset and now I'm trying to change 'field1' in 'table1'. I know there is a command dataset.select(..filter...) isn't there anything like dataset.update or something like that?
And what could I do to change a value of a row of a table?
Nope, I don't think that helps in my case. My database is an xml database, so I'm using no dataadapter, just the dataset. And the thing is that the change in the data comes from the user he clicks the button that says 'erase entry' and then I want the 'erased' field to be set to true. So I need to be able to do Dataset.Table.Change(...) if it existed, and then run Dataset.WriteXml(..).
So I wanna change the dataset and then write the xml.
Am I missing something I should be using like a dataadapter or something like that?
This thread looks dead but I thought I'd try anyway.
I'm completely new at working with DBs.
I copied the code from Beacon's tut and added the reference.
Made a DB in Access 2002
One table with three fields.
Stored the table in the same folder as the VB project and altered the path in the form load event.
WHen I get to line:
Code:
cn.Open
I get:
'Run tome error -yada yada
Authentication failed'
That fixed it, I cut too much off when I changed the path.
Another question.
Is there a a help file for ADO?
If so where do I get it and how would you set it so that, when you get a error msg from a line with DB code, it will check the ADO help file?
I'm one of those weird people that actually use the Help Button.