Results 1 to 5 of 5

Thread: Need to learn quickly how to work with databases.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2013
    Location
    Albania
    Posts
    101

    Need to learn quickly how to work with databases.

    I am making a notes app. I realized that I couldn't save each note in a text file(such as width,height,content,top,left,etc etc) and that I need databases, because that would be the best option. I need to learn quickly how to work with databases in VB6( I guess I'll have to use Access). Some e-book or video tutorials suggestions?? All I need to do is save data from VB6 form, retrieve data, and if possible secure the database with a password form VB6. Thanks.

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Need to learn quickly how to work with databases.

    Never used an e-book or video tutorial, never even looked at one

    There are tons of examples with sample code all over the internet many here on the forums. Have a look in the code bank or do a quick search of the net

  3. #3
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Need to learn quickly how to work with databases.

    You can use a text file for anything, and yes you can save left/top/width/height. You could even save a listview information but its a bit harder to extract the info. Database would be a good thing to learn for sure, just wanted to tell you a text file is possile to use.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2013
    Location
    Albania
    Posts
    101

    Re: Need to learn quickly how to work with databases.

    @DataMiser
    I think I'll have to look over the net.
    @Max187Boucher
    I tried using text files and the saving information part was fine, but retrieving the information so that I could use it, was difficult. I had to save how many notes(forms) were, and the sizes of each of them and te content of each of them.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Need to learn quickly how to work with databases.

    There are a few things to be aware of when you are dealing with databases and VB6.


    VB6 supports 3 options for data access APIs.

    One of these is actually any number of ad hoc data access API, rarely seen except with products like SQLite. You can basically ignore this since it is so rare.

    Another is the old DAO data access API. This dates back to MDB (Jet) databases even before there was an "MS Access" product. DAO is highly integrated with VB even as late as VB6, but it is something VB6 was meant to be the beginning of a transition away from.

    The last is ADO. This was a resdesign that was intended to support more datastores, not just Jet or even SQL Server or Oracle, etc. but also things that are not a DBMS at all. ADO is not as integrated into VB6, and was meant to be used by C++ programs or programs written in anything else (including scripting languages).

    DAO has its fans even today, but most people will recommend you use ADO. Pick a horse and ride it because mixing them will cause no end of confusion, especially to a beginner.


    VB comes with a number of data-bound controls.

    These were meant to support a high level model of development where you write little or no data access logic. There is an older DAO-bound set of these controls and a newer set of ADO-bound controls that first appeared with VB6.

    Many people will warn you off from using these at all. In any case they can be frustrating to learn outside of a structured training experience (a formal class) because they have a lot of "magic" going on inside... which was kind of the point.

    All I'll say is that if you are going to use these don't get the older DAO controls and newer ADO controls mixed up.


    Beyond that you'll need to learn some SQL (Structured Query Language). Each DBMS has its own SQL quirks.

    Jet 4.0 is an easy choice for desktop single user applications, it is part of Windows and has been for a long time now. With this you'll need to know that DAO uses one flavor of SQL and ADO uses another. The ADO flavor is fairly close to the version used with SQL Server (this is another Microsoft DBMS, poorly named - resulting in lots of confusion). Why two Jet SQL syntaxes? Because the DAO syntax was meant to be phased out but "temporarily" retained to let old programs still work alongside new programs. The ADO syntax was meant to help newer programs be moved from using Jet to SQL Server more easily.
    Last edited by dilettante; Mar 24th, 2013 at 11:17 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width