locked
Accessing a database from a class library RRS feed

  • Question

  •  

    I'd like to do some database access from a class library. All of the ways I'm familiar with for adding database connectivity revolve around a Windows Form and dragging stuff onto it. These facilities don't exist for a class library really.

    What is the prefered way to do this? Should I create a dummy winform for the sole purpose of hosting the database objects? Or are there ways to manually create the database objects in the library itself. The thing that seems to tripping me up however is that all of the classes get customized and generated when you drag them over and that aspect would be missing if I were to "roll it by hand"

    Thanks

    Bill

    Tuesday, January 10, 2006 7:57 PM

Answers

  • There are a number of examples of providing data access from a class library.

    I believe this article on creating strongly typed datasets, will work within a class library project as well.

    Tuesday, January 10, 2006 8:35 PM