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

  • SEARCH
  • Home
  • 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 8506781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:41:10+00:00 2026-06-11T02:41:10+00:00

Kindly help me with the following : I am using SQL database server 2008

  • 0

Kindly help me with the following :

I am using SQL database server 2008, in which I have a table with columns as shown in the image attached. I want to retrieve the ToolTip column and extract string after **Controls:** and separate type=value strings and list in a <code>ListBox</code> separately

I want to retrieve the ToolTip column and extract string after Controls: and separate type=value strings and list in a ListBox separately.

Then I want to loop through each row get the list and compare this list with another set of similar list and check if they have same string lists. I haven’t tried any code, since I don’t know how to start in the first place. Any help will be appreciated. Thank you.

  • 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-06-11T02:41:12+00:00Added an answer on June 11, 2026 at 2:41 am

    It would be better if you had

    Profile_Controls Table

    Profile_Name       Controls_Key     Controls_Value
    -----------------------------------------------------
    Lamp_Profile1      ON_OFF           ON
    Lamp_Profile1      BRIGHTNESS       NONE
    Fan_Profile1       ON_OFF           ON
    Fan_Profile1       SPEED            NONE
    .....
    

    Then you can select

    Select Controls_Key+'='+Controls_Value AS Settings From Profile_Controls Where Profile_Name = 'Fan_Profile1'
    
    Results
    -----------------
    Settings
    ---------------------
    ON_OFF=ON
    SPEED=ON
    

    This give you more flexibility as you can filter, JOIN, COMPARE, and use other built-in SQL functionality

    If you still want to maintain your table structure like you have it

    string[] mysplit = Tool_Tip.Split(s.Split(new string[]{"Controls:"}, StringSplitOptions.RemoveEmptyEntries);
    
    string controls = mysplit[1].Substring(0); //ON_OFF=On;BRIGHTNESS=NONE
    
    string[] eachSettings = controls.Split(';');
    
    //eachSettings[0] = ON_OFF=ON
    //eachSettings[1] = BRIGHTNESS=NONE
    

    UPDATE

    public System.Data.DataTable GetProfileSettings(string profilename)
    {
       string sql = "Select Controls_Key+'='+Controls_Value AS Settings From Profile_Controls Where Profile_Name = '"+profilename+"'";
       //write ADO.Net code here to get settings into DataTable
       //DataTable dt = blah blah blah;
    
       return dt;
    }
    

    in your page

    protected void SomeEvent_Handler(object sender, EventArgs e)
    {
       myListBox2.DataSource = GetProfileSettings("FanProfile1");
       myListBox2.DataTextField = "Settings";
       myListBox2.DataBind();
    }
    

    You can use this link as reference for adding item to your listBox How to retrieve commas delimited values in SQL to a ListBox separately

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

Sidebar

Related Questions

Please kindly help me in the following, I have $sub = C:\views\sght\gzad\text\hksdk\akldls\hool.java = C:\views\sght\bdsk\text\hksdfg\sdjks\same.java
The following code works partially. Kindly help to figure out the mistake #include<stdio.h> #include<stdlib.h>
I have reproduced my problem in a console app. Following is the code. using
I have an image processing algorithm which makes of matrices, I have my own
I have the following queries which calculates the total order sale happened in last
I have a dropdownlist with following options: <asp:DropDownList ID=ddlTaxStatus runat=server OnPreRender=ddlContainerStatus_PreRender> <asp:ListItem Text=--Select-- Value=-1></asp:ListItem>
I am using Zend_Validate_Regex, I need the regular expression which has the following check,
I have the following problem: int index=6; imageView.image=[imageArray objectAtIndex:index]; NSLog(@%@,[imageArray objectAtIndex:index]); If I run
I have started configuring ApacheMQ JMS Provider in Glassfish 3.1 server. I was following
I have a page called list.php which retrieves from database and shows all the

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.