Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vb.net - on page load controls populate based on MS SQL 2005 query

Posted on 2010-09-04
3
Medium Priority
?
326 Views
Last Modified: 2013-11-27
Looking for code that poulate checkboxes or radioboxes based on a query from ms sql 2005 query.

Select first_name from address where id = "us"

if the number returns 12 then populate the form with 12 checkboxes or radioboxes...

then a submit button at bottom of form so user can choose howmany firstnames they want to choose for the invite...
0
Comment
Question by:GlobaLevel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604756
You can add a column in you SQL table with bit datatype.the bit when it is populated in a form (datagridview or details view) it gives a check box.then when you update your selections you automatically gain what you want
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604762
Also you can have multiple selections only with checkboxes.
0
 
LVL 1

Accepted Solution

by:
supersugar earned 2000 total points
ID: 33623719
to generate checkbox dynamically:
For Each record in records
    dim checkbox as new checkbox
    checkbox.text=record("first_name")
   checkbox.potision=xx
   me.controls.add(checkbox)
...
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question