Jump to content

Recommended Posts

Posted

Hey all.

 

I have an interesting problem.

 

I have a table that contains settings for my application.

 

Now, instead of going the conventional route of having a data column per setting (which was just not practical, considering I have hundreds of available settings), I have them Arranged in rows.

 

Also, in order to have a master list of what settings are available, I have a reference table in a SQL compact database (nice and easy to swap-out :-)

 

To illustrate;

 

SettingsMaster Table

 

ID*** SettingName*** DataType * DefaultValue

--------------------------------------------------------

1***** SomeSetting*** Integer***** -1

2***** OtherSett******* Boolean***** True

 

 

and so on.

 

I then have the table where the settings Values are stored:

 

tblSettings

 

ID****** SettingID***** Value

--------------------------------

1******** 1****************** 7

2******** 2****************** False

 

 

OK. Still with me? Good.

 

 

I have written a GetSetting(SettingName as string) and a matching SetSetting.

 

 

What I would like to do, is be able to DataBind to my 'Settings System' - which would have been easire if I had used Column-Per-Setting, but I hope I can still do it with my Row-Per-Setting

 

I understand I would probably have to create a new class, and I have a feeling I'll need to implement an interface, but I have NO IDEA where to go from here.

 

 

 

I hope you guys can help :-)

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...