I have imported a VB6 program to .NET. The DataBase was used via ODBC but this do not work anymore. I can create the new connection in Server Explorer, this look like VB6 and it's simple.
My problem is to find the equivalent of the VB6 DataEnvironment. How do you use Table of the Connection in Visual Basic .NET?
Quote:Originally Posted by Optikal What are you trying to accomplish?
I’m working with Visiual Studio Net since yesterday, so I have a lot to learn. Basically what I would like to do is to import all my VB6 programs to .NET. This has been done automatically but I lost access with the DataBase (via ODBC).
I have downloaded ODBC_Net from Microsoft and installed it. I do not know what to do with it and how to use it.
Any Help to have access to an Access DataBase with Visual Basic .NET will be appreciated.
Quote:Originally Posted by Optikal What are you trying to accomplish?
I’m working with Visiual Studio Net since yesterday, so I have a lot to learn. Basically what I would like to do is to import all my VB6 programs to .NET. This has been done automatically but I lost access with the DataBase (via ODBC).
I have downloaded ODBC_Net from Microsoft and installed it. I do not know what to do with it and how to use it.
Any Help to have access to an Access DataBase with Visual Basic .NET will be appreciated.
Thanks,
Nicolas
OK it's work now with :
Imports System.Data
Imports Microsoft.Data.Odbc
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim connection2 As OdbcConnection
connection2 = New OdbcConnection("dsn=Josef_DB")
connection2.Open()
MsgBox("Connected")
Connection2.Close()
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe