?
Solved

DataReport Problems

Posted on 2003-03-04
2
Medium Priority
?
240 Views
Last Modified: 2010-04-07
Hey everybody,

I'm having a couple of problems with a DataReport I'm trying to create. First, I'm designing a program, but it won't be run on the computer where I'm coding it. I'm using a DataEnvironment with the DataReport to bound all the controls to my Access 2002 database. The problem is when I deploy the program to the other computer. I get a "Failed getting Rowset(s) from current data source." I know this problem is stemming from the DataEnvironment's database path; the path is different in my computer than the other computer's path. My question is, is there any way (either in code or through the DataEnvironment) that I can solve this little problem?

Secondly, just wanted to know how can I display a DataReport using a password-protected Access 2002 Database? I've tried different ways, getting the same error message as the question above. Thanks in advance!
0
Comment
Question by:DegenX23
[X]
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
2 Comments
 
LVL 3

Accepted Solution

by:
QJohnson earned 80 total points
ID: 8069356
You just can't hard code paths into your apps if you are going to run them in other environments.

You should be setting data source information and file path information at run time by either reading it from a trusted source (like your own ini file or your own registry settings), or (presumbably when your trusted source lets you down and you trap the error) from the user by offering an interface control from which they can make a selection (best if without having to type anything).

Such a control might be a file open dialog if they are file-hunting (as would be the case for a JET database).  Or you might put all available sources in a list box (e.g., all registered servers known to SQL-DMO, or all the databases on a particular SQL Server).

Once you have determined the REAL connection information, set it in the connection string (or other Connection object properties) and pass that to your Data Environment via whatever property is allows.

As far as the password protected Access DB:  make sure you know whether it is truly a database password or a userID and password (JET Security enforced).  For either, you obviously have to have the path and file name correct.  But the syntax for the password protected db is a bit tricky.  As I recall (I never use this - I use full JET security if I need any at all), you must specify ALL THE connection properties in the Open call and/or connection string items - even if the defaults would work for you:  specify them ALL.

If you have trouble after trying some of this, tell us specifically what you are trying and what the unhappy result is.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9046845
Hi DegenX23,
It appears that you have forgotten to close this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept QJohnson's comment(s) as an answer.

DegenX23, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

801 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