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 6812245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:25:33+00:00 2026-05-26T20:25:33+00:00

Currently I am using a DLL Library to get lists of custom objects. Which

  • 0

Currently I am using a DLL Library to get lists of custom objects.

Which is all great, for being able to use it in other projects.

But I want a dropdown box, which is a lookup of a DB table, with literally 3 options, (High, medium, low) and this isnt the only case that this is a problem.

Is there any short way of getting such info?

In ROR you could literally call SQL String to a db and get the list, with just one line of code…..

So Id like something like:

var mylist = sqldb.query("SELECT * FROM Priority");

Note: yes the above is completely made up.

Ideally I wouldnt have to set up any models either… and ideally also not have to attach a DB, rather use a query string- unless attaching is far easier and can be customised from the config file.

Update:
following an example, I now ahve the following, but it says System.ArgumentException: Keyword not supported: 'initial catalog'.

    using (var db = Database.OpenConnectionString(WebLite.Properties.Settings.Default.dbConnString))
    {
        var items = db.Query("SELECT * FROM TaskPriority");
    }

My connection string: Data Source=MYPC\WEB;Initial Catalog=WEBSQL;User ID=sa;Password=password;

  • 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-05-26T20:25:34+00:00Added an answer on May 26, 2026 at 8:25 pm

    You can use the Database class from WebMatrix.Data:

    var items = Database.Open(...).Query("SELECT * FROM Priority");
    

    However, in the long run, using Entity Framework will be more maintainable.

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

Sidebar

Related Questions

I'm using MS P&P Guidance Library for SharePoint 2010 in my custom solutions. Currently
I’m currently using the OpenNETCF.Desktop.Communication.dll to copy files from my desktop to a CE
I'm currently using SetWindowsHookEx to inject my DLL into another process, however it does
I'm currently using Brendan Tompkins ImageQuantization dll. http://codebetter.com/blogs/brendan.tompkins/archive/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness.aspx But it doesn't run in medium
Currently developing a connector DLL to HP's Quality Center. I'm using their (insert expelative)
Following the guide from Microsoft, http://msdn.microsoft.com/en-us/library/ee872121(VS.85).aspx , I am able to get my program
I'm using the MSBuild Community Task library to get the current SVN version an
im currently working in a simple program that implements plugins whith dll libraries (using
I'm currently trying to build a C++ library (DLL file) that interfaces with a
I have a DLL which takes care of custom drawing for some special glass

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.