JRO synchronization using VB6 and MS Access Permissions issue

Posted on 2007-04-04
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.
Question by:AmericaFan
  • 3
  • 2

Expert Comment

ID: 18871715
Not sure about JRO, I use ADO.  What statement are you getting the 13 on?

Author Comment

ID: 18872089
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.

Accepted Solution

quiklearner earned 500 total points
ID: 18873426
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
MsgBox "Runtime Error " &  Err.Number & "(Function/Sub/Property Name:" & VBA.Erl & ")" & vbCrLf & _  
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

Author Comment

ID: 18882987
I never knew I supposed to place the error routeen in fuctions/sub within fuctions/sub. Maybe that is why don't always work :)

Expert Comment

ID: 18883112
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..

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

830 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