Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help - Access 2000 database in VB6

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
CA
HI,
How do I open database of Access 2000 in VB6.
I tried but it doesn't accepts database of Access 2000.
Want to use Access 2000 database unable to use it.

Please help



 
James,
I am also using VB6 but working in a mixed environment of mostly Access97 and some Access2000. I use Access97. Can the reports in the Access97 database be run in the Access2000 environment? So far they don't. I just took a quick look in VB in References and Components and did not see Microsoft.Jet.OLEDB.4.0 listed. Do I need to download this from the Microsoft site (I'll head there now to look)or am I looking in the wrong place?
Thanks for any help.
Bob
104122.315@compuserve.com
PS the search engine was down on this site so I my apologies if this subject has been previously covered
 
James,
I am using DAO but doing most of the database accessing through code and SQL commands (too many unexpected results using DAO and ADO). I have an ACCESS97 database and to generate reports I design them in ACCESS97 then let the user choose and view them from the VB program using code like this which calls Access,opens the report & maximizes the window:

Dim objAccess As New Access.Application
'establish where clause for date range
vgWhere = "[Child].[DOP] BETWEEN #" & frmRange.txtRange(0).Text & "# AND #" & frmRange.txtRange(1).Text & "#"

'open database;open report;maximize window;use minimal toolbar
With objAccess
.OpenCurrentDatabase filepath:=BHTemp_Path
.DoCmd.OpenReport ReportName:="PlcHistChild", View:=2, wherecondition:=vgWhere
.DoCmd.Maximize
.Visible = True
.DoCmd.ShowToolbar "RepPrev", acToolbarNo
End With
'send Alt(%) space x to maximize Access app then right and down
'to position report for viewing
SendKeys ("% x{right}{down}")
'Give up CPU control
DoEvents
MsgBox "Report complete", vbOKOnly
Set objAccess = Nothing
Exit Sub
LoadError:
MsgBox Err.Description & Chr(13) & "from " & Err.Source & " -- Number:" & CStr(Err.Number)


This works on the machines that have ACCESS97 but not on the machines that have ACCESS2000. The 2000 machines don't seem to start ACCESS. Thanks for any help.
Bob
104122.315@compuserve.com
PS I have started downloading the ServicePack4 VS files. I don't know if they will help.
 
The SP4 update may help, but if possible you should upgrade your Access 97 database to 2000.

And if possible drop DAO and work with just ADO.

What version of VB are you using? I have the Enterprise Edition which definately includes Jet4 (jet4 is the standard for Access 2000). I also had installation problems until I installed Access 2000 and then VB.

Have you also tried to create an Access2000 database and link to all the relevant Access2000 information. This would be a container. You can then use ADO for both your databases, although I have found that linking to an Access database which links to another Access Database a little slow.

Regards
Kirk.
 
Kirk,
Thanks for the reply. I tried using ADO from the start of the project, back when nobody at work had ACCESS2000. After the 5th time my computer froze due to DAO/ADO conflicts (apparently) and after reading that ADO database operations can be 10 to 15 times slower then the same DAO operation I started all over trying to avoid either one. I am used to SQL commands so I use them. The operation is a non-profit organization so buying new software when the old works OK won't fly. I don't have ACCESS2000 so I have not been able to experiment with it.
I am using VB6 Professional Edition.
In References the project uses:
Microsoft Access 8.0 Object Library MSACC8.OLB

In Windows\System is MSJET35.DLL and MSJET40.DLL
(on my computer at least).

Does the Access.application object work with ACCESS2000?
Thanks for your help.
Bob
104122.315@compuserve.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top