Solved

VB6 User Control and Data Source!

Posted on 1998-11-17
3
241 Views
Last Modified: 2010-05-03
Hi,

I have written a generic user control which validates a user login.  It contains database references in the code, i.e. Dim db as database and rs as recordset which is the declarations for the lookup.  It then uses search methods to find the user and verify the password.

The problem I am having is when I run it in a separate test project I get a data source dialog asking me for DSN information!

When I run a similar piece of code stand alone in another project it works fine.  

Any ideas?

Regards one and all,

Jud.
0
Comment
Question by:jud
3 Comments
 
LVL 1

Expert Comment

by:yfang
ID: 1445257
Yes, some ideas but not a specific solution.  Do not worry about the points if this does not help you enough.

DSN means Distributed Server Network.  It looks like your database is designed as a distributed database.  This is why it works fine on a stand alone machine.  Please check the design of your database and documentation about distributed database.

Good luck!
0
 

Author Comment

by:jud
ID: 1445258
yfang, thanks for the reply.  the database isn't distributed, I meant stand alone project, not machine.  So, when I run code on this database in a standard EXE it works fine, but as soon as I make it into a user control and use it from another project, it comes up with this message.
0
 
LVL 8

Accepted Solution

by:
vettranger earned 50 total points
ID: 1445259
You get that dialog when VB can't find a value for the Databasename property of a database. You might try exposing a property from your usercontrol that you set with your databasename at runtime, and them use the value of that property when you open the database in your usercontrol.
0

Featured Post

Industry Leaders: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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.
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…

685 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