-
October 22nd, 2003, 05:08 PM
#1
Visual Basic and Access
I'm working on a school project in VB, and quite frankly, the teacher sucks...not teaching us what we need. My project involves using an Access Database and executing SQL statements on it and showing/inputing data etc. My problem isn't SQL, it's how to connect to the damn database....I'v googled it to death, and I'v not found any useful source or walk through, aswell as the books I have are useless. Soo....I turn to AO; any one here willing to show me how to create a connection to a database and how to open/close it and hopefully how to execute SQL on it if they have time.
Bleh....I need to go tell me teacher off for being useless!
- Noia
With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .: Bring OS X to x86!:.
Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.
-
October 22nd, 2003, 05:17 PM
#2
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X
-
October 22nd, 2003, 05:34 PM
#3
hmmm...it worked...and then it was as if it was /.'d DNS failure. Still, didn't contain alof of Syntax as far as I could see, but I didn't get to read it all either.
With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .: Bring OS X to x86!:.
Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.
-
October 22nd, 2003, 05:42 PM
#4
They tell you further into that section how to make a connection to a jet database via ado, and then even further down how to work with it. You need to do the research to understand how it all works.
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X
-
October 22nd, 2003, 06:04 PM
#5
Hmm, yea...Just these books and tuts I'v read are all messed up....I'm really confused now :s
With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .: Bring OS X to x86!:.
Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.
-
October 22nd, 2003, 06:18 PM
#6
Junior Member
Are we talking VB6 or VB.Net?
-
October 22nd, 2003, 06:20 PM
#7
Mad Beaver
-
October 22nd, 2003, 06:23 PM
#8
VB6, sorry, should have mentioned.
With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .: Bring OS X to x86!:.
Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.
-
October 22nd, 2003, 06:56 PM
#9
Junior Member
This will get you a connection to your database.
dim cnn as adodb.connection
With cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Jet OLEDB:System Database") = c:\mymdw.mdw
.Properties("Jet OLEDBatabase Locking Mode") = adLockOptimistic 'row-level locking
.Properties("User ID") = "User"
.Properties("Password") = "Password"
.Open c:\mydb.mdb
.Properties("Jet OLEDB:Lock Retry") = 5
End With
'With the connection you can then create recordsets.
Dim rst as recordset
Set rst = New Recordset
rst.Open "Select * from MyTable", cnn, adOpenForwardOnly, adLockReadOnly
' Then loop through the recordset
-
October 22nd, 2003, 09:20 PM
#10
I like VB, and I'm not to good with Databases, but good enough.
www.vbexplorer.com (forums and tuts)
www.planetsourcecode.com (ultimate for code examples)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|