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

  • SEARCH
  • Home
  • 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 8498701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:28:28+00:00 2026-06-11T00:28:28+00:00

I am writing an application which can connect to any SQL Server Database, thus

  • 0

I am writing an application which can connect to any SQL Server Database, thus can be considered as stand-alone. In other words, the first thing the application does is request a connection string. This application will be performing queries and other tasks on the database, thus SQL statements are required.

Hence, since I am not going to specifically attribute the application with a pre-defined database, how am I to execute SQL statements from my C# application? I would imagine that stored procedures are out of the question since the application can connect to any database.

I can easily just hard-code the SQL statements in the application itself, but I was wondering what the best practice approach could be in a case like this. Is it ok to embed SQL statements in the application, thus essentially having the business logic and data layer in the same application? I have no logical or technical problem with this, merely just wondering if it is a valid approach, or whether it would be frowned upon by seasoned developers?

I have heard of Entity Framework, however to be perfectly honest I am not sure what it does or if it would be valid. Up till now, all my data-driven applications have utilised stored procedures and this is the first time that I am writing an application which can be used with a database which is specified at run-time.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 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-06-11T00:28:30+00:00Added an answer on June 11, 2026 at 12:28 am

    Since you are building a query builder (no pun intended), you need to query the database catalog, which is the same for all databases under the same kind of DBMS. That will allow you to get the list of tables and other objects in any given database, so you can present them to the user.

    Whether you’ll use the pure ADO.NET or an ORM is an orthogonal question.

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

Sidebar

Related Questions

I need to develop an application which can access an SQL Server database stored
I am writing an application which uses web services to connect a remote server.I
I 'm writing a windows application which connects to sql server and performs a
I'm writing a simple application which will connect with a server. However I want
I am writing an Android application which can enable and disable the Network Data
I am writing a Java application which can encrypt and consequently decrypt whatever binary
I am writing an application , which User can create Topics and others can
I'm writing an application that displays a list of objects which the user can
I'm writing an application which will involve interaction with the database. The application will
I'm writing fairly simple application which connects to server through SSH (using paramiko ),

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.