Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 23-03-2005, 03:52 PM   #1 (permalink)
Apprentice
 
Join Date: Aug 2004
Location: Mumbai
Posts: 79
Default Visual Basic 6 and MS Access 2000


Here is the problem. I am making a program (a game actually) where I want to use a Microsoft Access 2000 database (using MS Access XP) to hold the data for the program, which I am coding in Visual Basic 6. I have never used third-party databases in VB programming before this and thus still have to learn a lot in that regard. When I try to use the database using the Data control it says that the database format is not acceptable. This is because the DB is essentially too new.

Can anyone direct me as to how exactly I can incorporate this database into my program without resorting to the home-grown database methods? When searching for solutions on the net all I can find our expertsexchange questions (but not the solutions, of course). I have Visual Studio .NET 2003 too, if that is any help (as in I should develop it in that environment). Also, does anyone have any nice online resources I can use (newbie, probably) to help with database programming in VB6. Thanks.
__________________
hummerBLOG
visit mumbaikids.net now!
sohummisra is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-03-2005, 05:44 PM   #2 (permalink)
Coming back to life ..
 
it_waaznt_me's Avatar
 
Join Date: Nov 2003
Location: A bit closer to heaven
Posts: 1,997
Default

All you need is ADO .. Just put an ADO control on your form, build the database connection string and you can access the database from your program ..

Lemme search some ADO tutorial for you ...

Okay .. here they are :
DevGuru's ADO tutorial
DevArticle's Implementation article
Sample Sourcecode from PSC ...
__________________
Sleight of hand and twist of fate...
On a bed of nails she makes me wait...
And I wait without you ...
With or without you ..
----
Batty = Too Busy Now !!!
it_waaznt_me is offline  
Old 23-03-2005, 09:25 PM   #3 (permalink)
Apprentice
 
Join Date: Aug 2004
Location: Mumbai
Posts: 79
Default

Thanks for the reply. Yeah I figured out that the ADO control works by looking through the SAMS book...well actually reading it (the last time I was just looking for a quick fix). Now it all works perfectly fine, although I still have to work on the syntax a bit. Thanks again.
__________________
hummerBLOG
visit mumbaikids.net now!
sohummisra is offline  
Old 23-03-2005, 10:13 PM   #4 (permalink)
Broken In
 
Join Date: Oct 2004
Location: Nagpur
Posts: 149
Default

i will recommend you not to use the ado control directly,

instead use the microsoft active x data library(select it from refrences) and then create a connection string in a module in your project

as you are using vb i hope you are completely aquinted with it

an example of connection string in module

Public Con As New ADODB.Connection
Public Rs As New ADODB.Recordset

Public Sub Connect()

Con.Provider = "Microsoft.Jet.Oledb.3.51"
Con.ConnectionString = "Data Source = " & App.Path & "\Database.mdb"
Con.Open

End Sub

then you can call this connect procedure anywhere in your program(you will need to use it just once) then use the recordset to fill it by using SQL qeuries

hope this will help you, for more you can mail me
__________________
\"I was born INTELLIGENT
But EDUCATION ruined me!!!!\"

AMD 64 3200+(Winchester), MSI RS480M2-IL, 512*2 DDR400 Hynix, Segate 80 GB SATA, LG E700SH, i-benz with Intex PS (400 W)
technoteen is offline  
Old 23-03-2005, 11:50 PM   #5 (permalink)
Coming back to life ..
 
it_waaznt_me's Avatar
 
Join Date: Nov 2003
Location: A bit closer to heaven
Posts: 1,997
Default

To use Access 2000 database he will need Jet 4.0 driver ..

I didnt gave him this suggestion cauz it will be tough for him .. Let him become comfortable with the Control first .. Then he can use the Code way too...
__________________
Sleight of hand and twist of fate...
On a bed of nails she makes me wait...
And I wait without you ...
With or without you ..
----
Batty = Too Busy Now !!!
it_waaznt_me is offline  
Old 24-03-2005, 01:08 AM   #6 (permalink)
Broken In
 
Join Date: Oct 2004
Location: Nagpur
Posts: 149
Default

oh sorry about it
i didnt notice that mistake

i just suggested this method because it more faster and powerfull but lets wait for his response what he says
__________________
\"I was born INTELLIGENT
But EDUCATION ruined me!!!!\"

AMD 64 3200+(Winchester), MSI RS480M2-IL, 512*2 DDR400 Hynix, Segate 80 GB SATA, LG E700SH, i-benz with Intex PS (400 W)
technoteen is offline  
Old 24-03-2005, 01:13 AM   #7 (permalink)
Coming back to life ..
 
it_waaznt_me's Avatar
 
Join Date: Nov 2003
Location: A bit closer to heaven
Posts: 1,997
Default

Ah.. dont say sorry yaar .. Yes its true its much faster than the control itself and more powerfull .. I too use when I have to run multiple queries ..
__________________
Sleight of hand and twist of fate...
On a bed of nails she makes me wait...
And I wait without you ...
With or without you ..
----
Batty = Too Busy Now !!!
it_waaznt_me is offline  
Old 24-03-2005, 11:53 AM   #8 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

http://www.visualbasicforum.com is a good place for all VB related queries.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 25-03-2005, 10:45 AM   #9 (permalink)
Apprentice
 
Join Date: Aug 2004
Location: Mumbai
Posts: 79
Default

Yeah my book doesn't have all the syntax and code for the coding method, but I am picking it up as I go. I guess the Data Control didn't work because it didn't use Jet 4??
__________________
hummerBLOG
visit mumbaikids.net now!
sohummisra is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by topgear
- by abhidev
- by clmlbx
- by Sarath

Advertisement




All times are GMT +5.5. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2