473,379 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 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 1022

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.