Re: Accessing Access 2007 Databases



Thatch wrote:
I'm using the following code to open an Access 2007 database:
Dim rstRecords as new ADODB.Recordset
Dim strConnectionString as string

' Set the connection string
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Databases\Access2007.accdb;Persist Security Info=False;"

' Connect to the database
rstRecords.let_ActiveConnection(strConnectionString)

And I get an "Unrecognized Database Format" error when I execute the
.let_ActiveConnection.

This works fine on an Access 2000 database but I'm trying to upgrade
to Access 2007 and I can't get Jet 4.0 to recognize the new database.
Any hints on what string I should use to make this work????

T
There is a new provider you need to use for Access 2007 ... off to
connectionstrings.com to get its name ... Here you go:
http://www.connectionstrings.com/?carrier=access2007

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: A little Rolodex [revised]
    ... including alpha sort and searching for any embedded string, ... In this application, a database is a directory, ... you may optionally provide any alternate UCASE program, ... NN -> first store NN as key length ...
    (comp.sys.hp48)
  • Re: return multiple rows from sql statement
    ... strings from input values is almost certainly a safe path to SQL ... Also, being a MySQL function, it knows what MySQL needs or uses. ... All characters that are entered in the fields make their way into the database unaltered. ... The insert of what surprisinlgly was NOT a syntax error, but a string called "mysql_insert_id" into an integer field resulted in the value zero being put in. ...
    (comp.lang.php)
  • Re: Invalid variant type conversion
    ... because within regular programming, there would be no agreement upon what ... applications built by standard Delphi controls, ... NULL is the same as "" in a database. ... >> The empty string tells it all. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Code to delete/unlink Linked tables
    ... Public intLinkODBCTables As Variant, intLinkDB2Tables As Variant ... Public strLinkBackendDB As String, strLinkDSNname As String, strLinkLibName ... ' MsgBox "This database is in MDE format...I will delete/recreate ODBC ... Public Sub fncLinkDB2Table() ...
    (microsoft.public.access.modulesdaovba)
  • Re: Establish connection with and transferring data to Access
    ... The specific problem with your code is that you need to quote string ... Dim vConnection As New ADODB.Connection ... Experiment with the object model or check the documentation for the ... Doug's code opens and writes to an existing database. ...
    (microsoft.public.word.vba.general)