472,803 Members | 971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,803 software developers and data experts.

using intellisense to pull data from a database

I have a series of class libraries. Some of the functions require string
constants to be passed in in order to effect certain behavior. Over time the
list of strings that could be passed in grew rather large and developers
often made mistakes by typing the wrong string in. I converted the string to
be numbers and started using enums. That way the developer just references
the appropriate assembly and then intellisense offers a drop-down of the
appropriate enum. Looks like this:

<top class>.customErrors.ERR_DATAACCESS_CONNECTIONMANAG ER

<top class>.customErrors.ERR_FILEACCESS_INIFILEREADER

<top class>.customErrors.ERR_GENERIC_LIBRARY_ERROR

etc - you get the idea. They get passed into a function that can act on it
appropriately by quering the database for the corresponding string value.
The problem is that the number of possible entries grows and then I have to
add it to the enum list and recompile.

My question - is there a way to simulate something similiar but allow the
enum values to query from a list of table values in a database? Obviously
this wouldn't be an enum anymore. Basically I just want the developer to be
able to type: foobar.customErrors.<dynamic list> and then rather than a
static list of values it would pull from a database.

Make sense? Any ideas?

Thanks,

- Jeff


Jul 21 '05 #1
0 1010

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Julia Baresch | last post by:
Hi everyone, I haven't found any reference to this problem on this group or in Access 97 help. I hope someone here knows this - probably a simple thing, but not obvious. I designed a query to...
1
by: Axel Dahmen | last post by:
Hi, I've created several Web User Controls and Web Custom Controls. None of them are available in the Toolbox or provide IntelliSense. Can someone please point me to some article explaining what...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
2
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
2
by: Jeremy Dillinger | last post by:
I have a program setup to pull data from a database. My database table has things such as (category, Item, price, etc.) In my program I want to have multiple list boxes that will have a pull down...
0
by: Jeff Patrick | last post by:
I have a series of class libraries. Some of the functions require string constants to be passed in in order to effect certain behavior. Over time the list of strings that could be passed in grew...
4
by: sparks | last post by:
We have a new project here, one that I have never tried maybe its easy I don't know yet. We have people that have records dating back over 5 yrs on a sql server. We have to build an access 2003...
5
by: giandeo | last post by:
Hello Experts. Could you find a solution for this problem please! I have the following tables in Access Database Table Name: origin Fields Names: country, countrycode Table Name: make...
6
by: tshad | last post by:
I was looking at a page that showed how to set up a custom event and it seems to work ok. But I am not sure how I would use it. How would I subscribe to it. There is actual action (such as...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.