
help connecting to Access2000 with VB6 Please
Matthew,
The Jet4.0 is good in any language.
Also i forgot to mention that you will need to set a
referance to the Microsoft ActiveX Data Objects 2.7
library.(or whichever mado 2. something library is on
your computer)
You do this by selecting referances under the project
menu in VB, then putting a check next to the mado library.
Gool Luck
Ed Voss
MCP
Quote:
>-----Original Message-----
>THX for replying Ed !!!
>This is what I'm looking for.
>This will get me started :)
>I'll give it a go and get back to you here !!
>One more question.
>I use jet 4.0 in my asp connection string.
>Does that mean this is valid for VB6 also ???
>THX again
>Matthew
>> Hi Matthew,
>> First, You new to see if you have the jet4.0 provider
on
>> your machine.
>> If you don't you can download it from microsoft.
>> I am assuming you want to use code to do this, so I
will
>> include a code snippit that you can use as a guide
>> Option Explicit
>> Dim cnn As ADODB.Connection
>> Dim rs As ADODB.Recordset
>> Set cnn = New ADODB.Connection
>> With cnn
>> .ConnectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;
Quote:
>> Data Source=" & App.Path & "\YourdbNameHere.mdb;Persist
>> Security Info=False"
>> .Open
>> End With
>> Set rs = New ADODB.Recordset
>> With rs
>> .Open "Select * from TableNameHere", cnn,
>> adOpenStatic, , adCmdText
>> End With
>> Do While Not rs.EOF = True
>> Code to find what you are looking for here
>> rs.movenext
>> Loop
>> 'Close rs and cnn objects and destroy to reclaim
>> 'memory
>> rs.close
>> cnn.close
>> Set rs = nothing
>> set cnn = nothing
>> Hope this helps
>> Ed Voss
>> MCP
>> >-----Original Message-----
>> >Hi all,
>> >I'm an webdesigner and work with ASP(vbscript) and
>> Access 2000 and SQL 2000.
>> >Now I decided that I want to use VB6 for some heavy
>> database work.
>> >So what I want is connect to a Access2000 database and
>> loop through the
>> >records.
>> >With Access97 I can connect but thats through
the "data"
>> thingie in the
>> >toolbar. But in this way I can't loop through the
>> records.
>> >I have to push forward ( which i'm not after )
>> >With Access 2000 I get a fault unknown database
layout.
>> >Any ideas / URL's / some code perhaps ??
>> >THX in advance
>> >Matthew
>> >.
>.