Dear All
I have one function to convert mdb database as follow:
Function ConvertMDB(SourceDB,DestDB,Format)
Set FSO = CreateObject("Scripting.FileSystemObject")
oldDB = SourceDb
newDB = Replace(SourceDb,fso.getfilename(SourceDb),"NEW_"&
fso.getfilename(SourceDb))
fso.getfilename(olddb)
dim Engine
Set Engine=Server.CreateObject("JRO.JetEngine")
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
oldDB, "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type="& Format &
";Data Source=" & NewDB
' delete original database
FSO.DeleteFile oldDB
' move / rename our new, improved, compacted database
FSO.MoveFile newDB, oldDB
set FSO = nothing
End Function
The Problem:
================
When i call function
call ConvertMdb(downloaddb,downloaddb,4)
it show error:
Microsoft JET Database Engine error '80004005'
Cannot perform this operation; features in this version are not available in
databases with older formats.
Please help
thanks
vichet
Bob Barrows [MVP] - 21 Oct 2005 13:52 GMT
> The Problem:
> ================
[quoted text clipped - 8 lines]
> Cannot perform this operation; features in this version are not
> available in databases with older formats.
The message is pretty clear-cut: you're trying to convert the database to a
previous version and it's telling you it can't.
Is the problem that you think the "4" in your function call means "Jet 4.0"?
If so, you're mistaken. According to:
http://doc.ddart.net/mssql/sql2000/html/mdacxml/htm/wpmigratingappendixc.htm
"4" is enumerated by "Global Const JET_ENGINETYPE_JET3X": Jet 3.x, not 4.0.
HTH,
Bob Barrows

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