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?
Printable View
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?
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) .
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.
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.
If you want some materials on ADO.NET , there are plenty of threads have already discussed this issue .
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.
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 . :(
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.
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:
Dim dbDatabase As DAO.Database Dim rsRecordset As DAO.Recordset Dim dbEngine As New DAO.DBEngine dbDatabase = dbEngine.OpenDatabase("c:\db1.mdb") rsRecordset = dbDatabase.OpenRecordset("Table1", DAO.RecordsetTypeEnum.dbOpenTable)
hope it helps