C
CR
I am making the switch to .NET from VB6. In VB6 you could access data
by using the Data Environment and Data Control. I found both to be
totally useless. I can just as easily accomplish the same task with
code. For example if I wanted to populate a textbox I would do
something like this:
Dim rst As New Recordset
Dim cnn as New Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\test\test.mdb;"
rst.Open "Select * From Table1", cnn
Text1.Text = rst!Field1
Using code, in my opinion, is much easier and more flexible than using
the Data Environment Wizard and the data control. Plus you can use in
in your VBA macros.
I have a tutorial on .NET but it seems to only cover .NET's version of
the Data Environment and Data control. I think they call it the Server
Explorer and Data Adapter.
Is there a way to access data using straight VB code like I did in
VB6?
Thanks!
Chuck.
by using the Data Environment and Data Control. I found both to be
totally useless. I can just as easily accomplish the same task with
code. For example if I wanted to populate a textbox I would do
something like this:
Dim rst As New Recordset
Dim cnn as New Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\test\test.mdb;"
rst.Open "Select * From Table1", cnn
Text1.Text = rst!Field1
Using code, in my opinion, is much easier and more flexible than using
the Data Environment Wizard and the data control. Plus you can use in
in your VBA macros.
I have a tutorial on .NET but it seems to only cover .NET's version of
the Data Environment and Data control. I think they call it the Server
Explorer and Data Adapter.
Is there a way to access data using straight VB code like I did in
VB6?
Thanks!
Chuck.