Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

DataReport Problems

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!
1 Solution
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.
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now