Question : How do I create a DLL for my VB.NET 2008 application?

I created a project that contains all the forms for my application and named it DataEntry.  I want to add a DLL to the project for data access to SQL EXPRESS 2008.  So, I added another project to my solution by adding a Class Library called DBLibrary with a class called DatabaseEngine.  I cannot even figure out how to access DatabaseEngine from DataEntry.  I thought that from DataEntry I could use the Imports statement, Imports.DBLibrary.DatabaseEngine, but this doesn't work.  What I'm after, is a multi-tier project.  What am I doing wrong, and what do I need to do to make this work?  Thanks ahead of time!

Answer : How do I create a DLL for my VB.NET 2008 application?

1) go to Solution explorer.

2) click right on  Refernce of DataEntry project. -> select (Add reference)

3) Select the tab (Projects) -> select DBLibrary. -> Click ok

4) go to your class that you want to use DatabaseEngine in and add: Import DataEntry.

5) in the method you want to call the data base function add:

Dim DBInstance as New DatabaseEngine

DBInstance.any member or method in this class

6) and have fun with the powerfull multi tier projects

Random Solutions  
 
programming4us programming4us