Results 1 to 9 of 9

Thread: DAO`s?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    IL
    Posts
    156

    DAO`s?

    Hello every one ive got this question:
    Is there in VB.NET DAOs?
    like in VB 6?
    i mean this simple objects that we used to connect to text boxes, combos and stuff?
    and if so how can i do it?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    No DAO nor ADO but ADO.NET (though you can still use any of the two but this won't give you 100% pure .NET code) .

  3. #3
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    If you could use DAO OK you will have no problem in working with ADO.NET. There is an extra layer in the conection process (you still need a connection object but a dataadapter is required to link up with a dataset, or datagrid etc).

    Have a look at the MSDN Help articles on the subject or this thread:
    http://www.vbforums.com/showthread.p...hreadid=279997

    There are several other threads her on the subject.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    IL
    Posts
    156
    ok I got it, I remember that in VB 6 we could give to textBar in the property its Data Source and here I didn't find a way doing this, does it mean I must use now lots of vars and through them perform simples tasks like update, insert delete etc'?
    and if u got some useful material about all these
    I would be thankful.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you want some materials on ADO.NET , there are plenty of threads have already discussed this issue .

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    IL
    Posts
    156
    Well thanks for the help, but I couldn’t find any serious information about ADO.NET here, well expect your program that simulates RS.MoveFirst, last etc', in which btw you got few bug (for example when you got more then 6 records it wont move more then the 6th.)
    What I really can u se is simple code that uses update, insert, and read data from access DB, and again my question can we connect textboxes labels and stuff to our
    OleDBconnection,, I mean like in its properties put them DataSource, or it must be done by hand the old way (txt1.text=data1.recordset….)?
    Appreciate your help.

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Here is the best link for ADO.NET . For binding stuff to DataSource property , yes you can bind it plus Member Value and other binding stuff (though , it's hell bad tech) .
    http://samples.gotdotnet.com/quickstart/winforms/

    As for my sample , it's too old and I didn't update it nor fixed the errors yet .

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    IL
    Posts
    156
    well if you got sample for all i metioned last submit it would be assome, and if not i got pretty much every thing i need here, thanks for Help.

  9. #9
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    well, the whole world is moving towards ado.net and dao community is diminishing. but those who are really addicted to dao finds very difficult to cope up with ado or ado.net. me too is not an exception.

    - To reference ur project to DAO, click Project-References
    - select COM tab
    - select DAO from the list

    to open a table try the following code:

    VB Code:
    1. Dim dbDatabase As DAO.Database
    2. Dim rsRecordset As DAO.Recordset
    3. Dim dbEngine As New DAO.DBEngine
    4.  
    5. dbDatabase = dbEngine.OpenDatabase("c:\db1.mdb")
    6. rsRecordset = dbDatabase.OpenRecordset("Table1", DAO.RecordsetTypeEnum.dbOpenTable)

    hope it helps
    Microsoft Techie

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