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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

630 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