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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 and Access 2002

Status
Not open for further replies.

jusan

Programmer
Mar 1, 2002
26
US
I am using VB 6, ADO Data Control 6.0 and ActiveX Data Object RecordSet 2.7 Library. When I create a database in VB, it is in Access 97 format. But the Access I have on my machine is 2002 version. How can I create a database that is in 2002 format?
 
Have you obtained the latest service pack (SP5)?
 
What I have on my machine is window Xp and Office xp and VB 6. Do I still need SP5?

By the way, I am having error msg "ODBC driver does not support the requested properties". Is there anything wrong with my setting?
 
your access driver is at fault. go to your control panel and open odbc data sources. after you open odbc select the drivers tab and click microsoft access driver 4.0 (.mdb) then click apply. this should take care of you problem. also make sure that you test this connection with you ado data control under test in the ado properties
 
I went into control panel just as you said. When I click on Microsoft access driver 4.0, the "apply" command is inactive. And After I click "OK", it is not changed. I don't know whether it is because I do not have jet 4.0 on my machine or not. How can I can OLE DB Jet 4.0?
 
MDAC 2.7 does not include the necessary Jet 4.0 drivers. Visit Microsoft's MDAC pages, and either download the Jet 4.0 pack, or download MDAC 2.5 (which includes Jet), install it and then reapply MDAC 2.7
 
After download the jet 4.0, I got the following msg:
"Could not find installable ISAM"
when I try to make a connection with Provider=Microsoft.Jet.OLEDB.4.0

I don't know why?
 
Code:
Public Function CreateDatabase(DBPath As String) As Boolean
Dim DBPath As String
        
DBPath = InputBox("Please type the desired path", "DBPath")

'*****************************
'PURPOSE: Creates Access 2002 Database Using ADOX
'PARAMETERS: DBPath: full path of database to create
'RETURNS: True if sucessful, false otherwise
'REQUIRES: Installation of and reference to ADOX
   '(Microsoft ADO Ext. 2.1 for DDL and Security
   'If you don't have this in your references list,
   'go to [URL unfurl="true"]http://www.microsoft.com/data[/URL] and download
   'MDAC
'********************************************
   On Error Resume Next
   Dim oCatalog As New ADOX.Catalog
   oCatalog.Create _
       "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
 
  CreateDatabase = Err.Number = 0
End Function
 
Thank you very much. It works fine now. It has been a great help to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top