Windows 7 ADO
Moderators: Dorian (MJT support), JRL
Windows 7 ADO
I am using Macro Scheduler 9. I have a program compiled on a Windows XP machine that uses ADO to access a MS Access 2010 database and every thing works fine. When I run the same compiled program on a Windows 7 machine, it cannot access the database. Does this mean it needs to be compiled on a Windows 7 machine in order to run on a Windows 7 machine?
-
- Pro Scripter
- Posts: 60
- Joined: Tue Dec 22, 2009 9:51 am
- Location: Mannheim ( Germany )
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Is Access and ADO installed on the Win 7 machine with the same drivers?
What error do you get?
What error do you get?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Windows 7 ADO
Would you please show us the MS code in connection to the ADO?plywoodca wrote:I am using Macro Scheduler 9. I have a program compiled on a Windows XP machine that uses ADO to access a MS Access 2010 database and every thing works fine. When I run the same compiled program on a Windows 7 machine, it cannot access the database. Does this mean it needs to be compiled on a Windows 7 machine in order to run on a Windows 7 machine?
The error code is "3811 - Attempt to open a databse with the request record level locking failed; page level locking will be used." I believe this is just a warning and I have since added code to ignore it but what parameters do I need to set to avoid the warning?
The VBScript code is
The VBScript code is
Code: Select all
function ConnectDB()
DBError="N"
set cnn1 = CreateObject("ADODB.Connection")
cnn1.Mode=adModeReadWrite
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDB.mdb"
If cnn1.Errors.Count > 0 Then
For Each errLoop In cnn1.Errors
if errloop.SQLState <> "3811" then
strError = "Error #" & errLoop.Number & _
" " & errLoop.Description & _
" (Source: " & errLoop.Source & ")" & _
" (SQL State: " & errLoop.SQLState & ")" & _
" (NativeError: " & errLoop.NativeError & ")"
msgbox strError
DBError="Y"
end if
Next
end if
if DBError = "N" then
ConnectDB = "Success"
end if
end function
Instad
Try
Code: Select all
cnn1.Mode=adModeReadWrite
Code: Select all
cnn1.Mode=adModeShareExclusive