Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

No Support for Microsoft.Jet?

Discussion in 'Information Technology' started by Mike Zehner, Jul 28, 2006.

  1. Mike Zehner

    Mike Zehner
    Expand Collapse
    Guest

    Hi All -

    I have written several vbs scripts over the years to perform active
    directory functions. In these scripts I often write to or read from an
    Access database. Normally I just copy the script and db onto a server and
    run it with no problems.

    Lately we have deployed a few 64 Windows 2003 servers. To my surprise it
    appears that the 64 bit version of Windows no longer supports the
    Microsoft.Jet provider. I have found a copy of articles that confirm that.

    To access an Access DB I would use the following commands:

    ' Create Connection object to access DB
    Set objConnection = CreateObject("ADODB.Connection")

    ' Create DB Recordset object
    Set objRecordset = CreateObject("ADODB.Recordset")

    ' Open DB Connection
    objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=ChangePW.mdb;Jet OLEDB:System Database=System.mdw;"


    Question:

    Now that MS won't support this method on 64 bit servers does anyone out here
    have an alternate way of using vbs to access an Access DB?

    TIA

    Mike
     
  2. Loading...


  3. Albert D.Kallal

    Albert D.Kallal
    Expand Collapse
    Guest

    Are you sure it is a jet problem? Perhaps the ADO provider is broken, or not
    installed correctly?

    It is possible that the JET don't work on windows 64, but I would also check
    if the ADO provider is at stake.

    Can you try a script without using ADO?

    Set dbeng = CreateObject("DAO.DBEngine.36")
    strMdbFile = "C:\Documents and Settings\Albert\My
    Documents\Access\ScriptExample\MultiSelect.mdb"
    Set db = dbeng.OpenDatabase(strMdbFile)
    strQuery = "select * from contacts"
    Set rs = db.OpenRecordset(strQuery)
    rs.movefirst
    If rs.EOF = true Then
    quit
    End If

    strTextOut = "C:\t5.txt"
    set fs = Wscript.CreateObject("Scripting.FileSystemObject")
    Set ts = fs.OpenTextFile(strTextOut, 2, True)
    ' 2 = write, 1 = read

    do while rs.EOF = false
    strOutText = rs("LastName")
    ts.Writeline strOutText
    rs.movenext
    loop
    ts.close
    rs.close

    Try by-passing ADO...and see if DAO works.....

    --
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
    pleaseNOOSpamKallal@msn.com
    http://www.members.shaw.ca/AlbertKallal
     
  4. Mike Zehner

    Mike Zehner
    Expand Collapse
    Guest

    Albert -

    Thanks for your help. I tried DAO but I get an error saying that "ActiveX
    component can't create object DAO.DBEngine.36".

    MS has published a paper "Data Technologies Road Map" which says that MDAC
    2.6 and later will not contain Microsoft Jet or Microsoft Jet OLE DB.

    The server in which this fails is Windows Server 2003 R2 x64.

    Mike

    "Albert D.Kallal" <PleaseNOOOsPAMmkallal@msn.com> wrote in message
    news:eeCitoRoGHA.4784@TK2MSFTNGP04.phx.gbl...
    > Are you sure it is a jet problem? Perhaps the ADO provider is broken, or
    > not installed correctly?
    >
    > It is possible that the JET don't work on windows 64, but I would also
    > check if the ADO provider is at stake.
    >
    > Can you try a script without using ADO?
    >
    > Set dbeng = CreateObject("DAO.DBEngine.36")
    > strMdbFile = "C:\Documents and Settings\Albert\My
    > Documents\Access\ScriptExample\MultiSelect.mdb"
    > Set db = dbeng.OpenDatabase(strMdbFile)
    > strQuery = "select * from contacts"
    > Set rs = db.OpenRecordset(strQuery)
    > rs.movefirst
    > If rs.EOF = true Then
    > quit
    > End If
    >
    > strTextOut = "C:\t5.txt"
    > set fs = Wscript.CreateObject("Scripting.FileSystemObject")
    > Set ts = fs.OpenTextFile(strTextOut, 2, True)
    > ' 2 = write, 1 = read
    >
    > do while rs.EOF = false
    > strOutText = rs("LastName")
    > ts.Writeline strOutText
    > rs.movenext
    > loop
    > ts.close
    > rs.close
    >
    > Try by-passing ADO...and see if DAO works.....
    >
    > --
    > Albert D. Kallal (Access MVP)
    > Edmonton, Alberta Canada
    > pleaseNOOSpamKallal@msn.com
    > http://www.members.shaw.ca/AlbertKallal
    >
     
  5. Albert D.Kallal

    Albert D.Kallal
    Expand Collapse
    Guest

    Hum, see, EVERY copy of windows xp ships with JET...so, it is ALWAYS
    installed....

    The above was much the reason why no one cried when jet was removed from
    MDAC, since EVERYONE already has it!!!

    I really like the fact that windows ships with jet/dao built in.

    Your case seems to be that of using the 64 bit version of windows. I suppose
    a possible solution is to build a small application in VB6 that includes
    jet, or perhaps even consider building a ms-access runtime. Both of these
    approaches would ensure dao/jet is a installed. As for ADO...I just not
    sure....


    --
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
    pleaseNOOSpamKallal@msn.com
    http://www.members.shaw.ca/AlbertKallal
     
  6. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    As far as I can tell, Mike, it does seem to be the case that JET and DAO are
    no longer supported on 64-bit versions of Windows. I don't know whether the
    new Access Database Engine used by Access 2007 will or will not work on
    64-bit versions of Windows. If it does, that might be one possible solution
    for you. (I believe you would have to install Office or Access on the
    server, my understanding is that the database engine can not be distributed
    separately.) If not, then it seems you may have to use another database
    engine. If you don't have access to a full SQL Server instance, there's
    always SQL Server Express.

    --
    Brendan Reynolds
    Access MVP

    "Mike Zehner" <mbzehner@yahoo.com> wrote in message
    news:%23ELQgWRoGHA.4292@TK2MSFTNGP05.phx.gbl...
    > Hi All -
    >
    > I have written several vbs scripts over the years to perform active
    > directory functions. In these scripts I often write to or read from an
    > Access database. Normally I just copy the script and db onto a server and
    > run it with no problems.
    >
    > Lately we have deployed a few 64 Windows 2003 servers. To my surprise it
    > appears that the 64 bit version of Windows no longer supports the
    > Microsoft.Jet provider. I have found a copy of articles that confirm that.
    >
    > To access an Access DB I would use the following commands:
    >
    > ' Create Connection object to access DB
    > Set objConnection = CreateObject("ADODB.Connection")
    >
    > ' Create DB Recordset object
    > Set objRecordset = CreateObject("ADODB.Recordset")
    >
    > ' Open DB Connection
    > objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=ChangePW.mdb;Jet OLEDB:System Database=System.mdw;"
    >
    >
    > Question:
    >
    > Now that MS won't support this method on 64 bit servers does anyone out
    > here have an alternate way of using vbs to access an Access DB?
    >
    > TIA
    >
    > Mike
    >
     

Share This Page