SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    Location
    GUJ
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing Database from Access to Sql Server in .Net Application

    Hi,

    I have a website which need to be upgraded from access to sql server and thus I have to go to each file one by one and change each database connection object (example: Oledbdatareader to SqlDataReader).

    I need to know if there is any way we could use when developing a .net application where we define database objects in one single file and it can be used globally. This way changing from one database to another would become very easier.

    Any idea, any help

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,576
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Fundamentally your problem is you are talking to the database directly in every file -- you should really have a service layer that handles that rather than directly reference ADO.NET.

    You also might want to look at modern conveniences like ORMs while you are at it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •