473,581 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically setting values

Hi,

I have the lKey object that can be used to enable different operation
systems such
Windows 2000
Linux
FreeBSD
etc.

Now I want to read a database table that contains key/values and if the key
is "OSTypes", I like to set the appropraite OS (more than one OS can be
set).

lKey.Enable(Com pany.OSTypes.Re dhat);
lKey.Enable(Com pany.OSTypes.Wi ndows);
....

I really don't want to use IF and SWITCH for every possible value. Is it
possible to set the ??? in lKey.Enable(Com pany.OSTypes.?? ??) to whatever
value read from the database?

Thank you
Maz.
Nov 19 '05 #1
0 937

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

Similar topics

5
2062
by: Sparrow | last post by:
I have created a table with the following columns... Date(datetime),Actual (Int),Planned (Int) I need to insert weekending dates starting from 23/04/04 looping thru'for the next 52weeks automatically into the date column. Then in the actual and planned colums, I need to insert a count of some records in the table. I will appreciate...
4
1510
by: David Sworder | last post by:
With a standard enum, values are automatically assigned. public enum MyEnum{Happy,Sad,Angry,Grandpa}; ....but what about a bitflag enum? public enum MyEnum:int{ FalseTeeth=0x00000001 BrainCancer=0x00000002
6
1744
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to create a database in which _adding a new record automatically creates a new field in the table_ (ideally, deleting a record would also delete the field...
1
1128
by: Maziar Aflatoun | last post by:
Hi, I have the lKey object that can be used to enable different operation systems such Windows 2000 Linux FreeBSD etc. Now I want to read a database table that contains key/values and if the key
0
918
by: barry | last post by:
hi i have a screen with customer details on it. for some items i only want to make a combobox available. eg. country - this will hold a defined list of countries. my question is how i set up the datasource etc. on this combo. of course when opening the screen i want the existing value for this customer to be shown, eg. UK. but the actual...
13
3529
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The first 7 have to do with respondent information like grade, class and age. I have those in a table with a PK of RespondentId, which is autonumbered....
0
2168
by: RKT | last post by:
I have a DataGridView bound to an MS Access table. This is a single- user application. When the User is adding or editing a row, the User may click on a Control elsewhere. That Control has context which I use to programmatically set *other* r/o cell values for the currently selected grid row. So, after that click on another control, and...
2
2549
by: Keith G Hicks | last post by:
asp.net 2.0 I have set my web.config as follows: <forms timeout="30"/(I know that's the default but I may chang it so the line's in there) I also have a few cookies I'm setting on my login page to hold the UserName, UserID and the value of another field in my db so that as the user is navigating around the site I can test for certain...
1
6239
by: billelev | last post by:
Here is some code that I have adapted slightly. It allows a report to be printed to a specific location. It works by calling SaveReportAsPDF and specifying the access report name, and the root directory to which the filename should be saved. The routine adjusts registry values to achieve its aim. Now, it works, but not quite as I would...
0
7792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8149
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8175
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6553
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3805
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1138
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.