Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

griffitd (Programmer) (OP)
8 Jun 12 4:27
Hi i have the following code:

Dim cn As ADODB.Connection
Dim lngOldCommitMode As Long

Set cn = New ADODB.Connection
If bUseSlash = True Then
cn.Open "OLE DB Services=-4;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\" & DBServer & "\" & DBPath & "\" & DBName & ".mdb"
Else
cn.Open "OLE DB Services=-4;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\DG Software\LHScanning.mdb"
End If
lngOldCommitMode = cn.Properties("Jet OLEDB:Transaction Commit Mode")
cn.Properties("Jet OLEDB:Transaction Commit Mode") = 1

sSql = "UPDATE LockersLive SET Allocated = True WHERE BlockId = " & rs.Fields("BlockId") & " AND Isle = " & rs.Fields("Isle") & " AND Side = " & rs.Fields("Side") & " AND Row = " & rs.Fields("Row") & " AND Column = " & rs.Fields("Column")
cn.Execute sSql, , adExecuteNoRecords

cn.Properties("Jet OLEDB:Transaction Commit Mode") = lngOldCommitMode
cn.Close


on my windows 7 pc i get class not supported automation error. Im guessing its an ADO issue.

CAn anybody help please

thanks in advance
tedsmith (Programmer)
11 Jun 12 9:02
At what point does the error occur?

Does this error happen when you have only this code in a small test app or when you have other apps or processes running?
I use similar code but don't have the "OLE DB Services=-4;" statement in it and it works in win7

May have no connection but I had a similar "automation error" issue with similar code but only when I also had a web camera running!
griffitd (Programmer) (OP)
12 Jun 12 3:16
Hi Thanks for the reply.

I recompiled the vb app on a XP Virtual PC and it fixed the problem.

Thanks
dilettante (MIS)
12 Jun 12 11:37
Note that if you set a reference to ADO in the VB6 IDE while working on a Win7 SP1 machine you will be able to compile and run there. But you've built a time bomb that will go off when your program is deployed anywhere but a Win6.1 SP1 system.

Then we get yet another question like this.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close