Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 851083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:22:19+00:00 2026-05-15T07:22:19+00:00

I am looking to port my very basic DBMS software from classic ASP to

  • 0

I am looking to port my very basic DBMS software from classic ASP to ASP.net – however the user would need to input the connection details in order to connect to their specific DBMS server.

Is this at all possible with ASP.NET MVC (very similar to DSN-less connections in ASP).

Cheers,
Joel

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:22:20+00:00Added an answer on May 15, 2026 at 7:22 am

    The question should really be “is this possible with .NET”, ASP.NET MVC is not a database technology, and DSN-less connections aren’t ASP technology either. In .NET, it is the ADO.NET framework that allows you to access database resources, and it can be used from any .NET code, be it desktop, web and mobile too.

    There are some specialised libraries for certain platforms, .NET includes native support for Sql Server, you can get the MySql Connector for .NET, etc.

    All of these providers are built around the ADO.NET provider model, you can either use them explicitly, or you can use the provider-agnostic method. Here are two examples, the first being Sql Server:

    string connectionString = "Server=....";
    using (SqlConnection connection = new SqlConnection(connectionString))
    {
      using (SqlCommand command = new SqlCommand("SELECT [Name] FROM [People]")) 
      {
        connection.Open();
    
        using (SqlDataReader reader = command.ExecuteReader()) 
        {
          // Do something here.
        }
      }
    }
    

    In the above example, I’m using the specific Sql Server ADO.NET types to create a connection to a database and execute an arbitrary query against it.

    If you are intended to support multiple database platforms, it’s probably best to design your code such that it can utilise the ADO.NET Factory classes which are specialised factories geared to the creation of platform specific types. In the example below, I’ve used the Factory classes to access a MySql Server database:

    string connectionString = "Server=....";
    DbProviderFactory factory = DbProviderFactories.GetFactory("MySql.Data");
    using (DbConnection connection = factory.CreateConnection()) 
    {
      connection.ConnectionString = connectionString;
    
      using (DbCommand command = factory.CreateCommand())
      {
        command.CommandText = "SELECT `Name` FROM Page";
    
        connection.Open();
    
        using (DbDataReader reader = command.ExecuteReader())
        {
          // Do something here.
        }
      }
    }
    

    Not the perfect example, but enough to get you going, but it’s important to remember that DSN-less connections are not tied to ASP or ASP.NET.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.