-
ADO newbie
Can anyone send me a small piece of sample code using ADO? I have been
using DAO and need to learn ADO. I need a very simple example of connecting
to an access 97 db. Thanks for any help.......
-
Re: ADO newbie
"Doug" <doug@seisystems.com> wrote:
> Can anyone send me a small piece of sample code using ADO? I have been
>using DAO and need to learn ADO. I need a very simple example of connecting
>to an access 97 db. Thanks for any help.......
>
>
Let see if this code help:
Dim cnn as ADODB.Connection
'Create a new reference.
'-----------------------------------------------------------
Set cnn = New ADODB.Connection
'Set the information ADO need to connect to the database.
'-----------------------------------------------------------
cnn.ConnectionString ="Provider=Microsoft.Jet.OLEDB.3.51;" _
& "Data Source=C:\Microsoft Visual Studio\Vb98\Biblio.mdb"
'Open the connection.
'-----------------------------------------------------------
cnn.Open
NOTE: Remember create the reference to ADO in my case I'm using ADO 2.6 and
close the connection when you're closing the application or when you don't
need it anymore.
Let me know if I'm wrong, we can talk about it.
Have fun :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks