No Support for Microsoft.Jet?

M

Mike Zehner

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
 
A

Albert D.Kallal

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.....
 
M

Mike Zehner

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
 
A

Albert D.Kallal

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....
 
B

Brendan Reynolds

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top