Solved

JRO synchronization using VB6 and MS Access Permissions issue

Posted on 2007-04-04
5
430 Views
Last Modified: 2008-02-01
I have created an application in VB6 (XP Operating System) that uses an Access Database backend. The application is to be installed to a laptop where a user can enter data without being logged into out network (MS Active Directory) because each laptopt has a replica database. The master resides on one of our servers. When a user needs to synchronize there data, they log in to our netword, open the application and click a button. The button runs a sub that is using JRO to do the sync.
My problem:
When I run my application (I have admin rights to the entire network), I don't have a problem with the synchronization process. But if I log into the network as a regular user (User Rights), I get a run time error 13 saying Type mis match. I know the problem is the permissions of the user loging into the network, but I'm not sure about how to go and fix the problem.
I thought if I got feed back from others they might be able to direct me to a better way of doing what I am doing, or maybe state something that might resolve the permissions issue.
Thanks...John
0
Comment
Question by:AmericaFan
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:quiklearner
Comment Utility
Not sure about JRO, I use ADO.  What statement are you getting the 13 on?
0
 

Author Comment

by:AmericaFan
Comment Utility
quiklearner, Sorry. I'm new here. I figured out what the problem was. Users need to have Power User Rights on their laptops in order for the database to sync.
Is ADO better? I only used the JRO because I found an example years ago and never thought to look and find how to do it other ways.
0
 
LVL 4

Accepted Solution

by:
quiklearner earned 500 total points
Comment Utility
Well from what I know, ADO (ActiveX Data Objects) is pretty easy to use.  It offers easy support for connecting to most db types, and has ties into the datasource properties of the standard listboxes/comboboxes.  Releases of it are included in Microsofts MDAC installs/updates (Microsoft Data Access Components).  If you are familiar with the object browser (f2 in the VB IDE) you could reference anything labeled "Microsoft ActiveX Data Objects X.X Library" where X.X is the version; you probably several but choose just one, and look through it.  Your built-in help (f1) will contain help on the objects/methods/properties too.
Now I am curious as to what would have generated a type mismatch based on that.  Did you ever isolate the line it was occuring on?  To do so just run it in debug.  If you can't, guess as to where the issue occurs.  Number the lines and assuming you are not trapping for errors add "On Error Goto PROC_ERROR" to the top of the function/sub/property.  Remember, if you call other functions/subs/properties of yours, you will need to also modify those functions/subs/properties to do this as well.  At the end of each of these functions/subs/properties place:

Exit Function/Sub/Property
PROC_ERROR:
MsgBox "Runtime Error " &  Err.Number & "(Function/Sub/Property Name:" & VBA.Erl & ")" & vbCrLf & _  
    Err.Description
End Function/Sub/Property

Then compile it.  This will tell you where the problem is.  Line numbers go on every line except Public/Private/Friend/Dim statements as well before the first Case, after the select statement.  Usually people initially numbers lines in multiples of ten so there is room to grow without having to renumber a bunch (you still me have to some):

10  If x = 45 Then
20      MsgBox "I got " & x
30  End If
0
 

Author Comment

by:AmericaFan
Comment Utility
I never knew I supposed to place the error routeen in fuctions/sub within fuctions/sub. Maybe that is why don't always work :)
Thanks
0
 
LVL 4

Expert Comment

by:quiklearner
Comment Utility
If you want to isolate it all the way down to the actual line it errors on, it would be a good idea.  If you are not concerned about that much granularity then you probably don't need to.  BTW I forgot to point out that in the sample above VBA.Erl prints the line number the error occured on..
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now