DB Table Design For Checkboxlist Control
Feb 4, 2008
I was just wondering what would be a preferred approach in designing the tables against checkboxlist?
For example I have 3 checkboxlist:
chklVendor
chklModel
chklColor
and each will have lets say 4 - 5 list items.
Here are the different types of approaches that I've seen when designing database tables:
1. Creating tables for each checkboxlist.
2. Creating a single table and storing the values in a comma delimited format.
3. Using XML
Also these attributes will be used in the search form as one of the fields.
View 1 Replies
ADVERTISEMENT
May 22, 2006
I have a checkbox list like the one above.
For example, Training OR Production – should include everyone with an Training OR everyone with a Production checked OR everyone with both Training and Production checked. If service AND technical support – just those two options will show – the customer can only have those 2 options selected in their account and nothing else.
Is there an easy way to build the SQL query for this scenario? Any suggestions or tips?
Thank you for any help
View 1 Replies
View Related
Oct 24, 2006
Hi everyone,
Is Microsoft thinking over the possibility to implement Control+Z in order to avoid drawbacks when you're writing a package? I mean, when you drop a container then you aren't able to retrieve again
.
That same behaviour happened with Sql2k-dts.
Thanks in advance and regards,
View 3 Replies
View Related
Jan 27, 2008
Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.
With Thanks
M.Mahendra
View 5 Replies
View Related
Oct 28, 2007
Hi,
I am new to SSRS.
I have created simple report using reporting services, In which i am using one List element and inside that 8 text boxes and a table, in which 4 texboxes is used as lable and remain 4 textbos is value from dataset and table displays details as below for each unquie call number with table header marked in red color. When i click preview i get below report(Report 1) for call number 4 and 10 records in table which is under list. But for call number 4 still 6 records as to be display in next page with text boxe element which marked in Green color in Report 1. Now i am getting report with out List element i.e (Report 2 given below )
Report generated for Call numnber 4 (on click of preview ) (Report 1)
Generated Report
Call No
4
CallDate
2/2/2007
Customer Name
ZINDAL STEEL P . LTD
Address
Chennai
SL Number
PartNumber
PartName
Qty
Rate
Amount
1
12345
SCREWS
100
10
1000
2
47555
BOLTS
200
25
5000
3
125453
RIVETS
300
40
12000
4
15786
RATCHETS
500
23
11500
5
15566
TORQUE WRENCH
600
45
27000
10
5456
HARMONIZATION TOOL
700
45
31500
(Report 2)
Report generated for Same Call number 4 in next page with out List element, In this page i want display the same textboes and values which are marked in green color.(This 6 records alos belongs to same call Number 4 )
SL Number
PartNumber
PartName
Qty
Rate
Amount
11
12345
SCREWS 6"
100
10
1000
12
47555
BOLTS 5"
200
25
5000
13
125453
RIVETS 5"
300
40
12000
14
15786
RATCHETS Big
500
23
11500
15
15566
TORQUE WRENCH Small
600
45
27000
16
5456
HARMONIZATION TOOL
700
45
31500
Can any one please guide me how to do this kind of desing.
Thanks and regards
Manju
View 2 Replies
View Related
Jun 13, 2006
hi all of you,
I haven€™t idea if the following description is a issue or not, anyway:
I begin from Control Flow layer.
I€™ve created a sequence container and inside I€™ve got two groups, one own a sql task and another one own a Data Flow task. Both are linked for a completion conector. Up to here everything is fine. But when I collapse my sequence container the arrow remains there for these tasks and you can see the sequence container €œclosed€? and the arrow lonely.
Not very esthetic, not practical.
Any clarification or though will be as usual welcomed
View 6 Replies
View Related
Oct 7, 2015
 I currently have a DB that is growing at a rate of 10gb per month. It is set to 1mb unrestricted growth and the log file is set to 400mb restricted growth. I take regular transaction log backups so the log file is well under under without any issue. This DB's recovery model is set to FULL as it has to be mirrored to a backup site.  Any recommendations on how to control the growth. - Is it advisable to take create a new DB with data older than 2 years and transfer that file to an external drive and if i do this, can i "attach" it back to the main server if and when required ?
View 7 Replies
View Related
May 14, 2008
When I'm designing a merge join in BIDs, in particular a large one with say a couple hundred columns on the left part of the join (and only 1-2 columns on the right side), it takes 2-3 minutes to close and I notice it pegs the CPU on the computer during that time. I'm developing on a quad dual core 64 bit machine with 32 Gb of RAM.
What makes this problematic is if you have a several merge joins in the pipe, and you do something like add a column. Then you have to re-open every merge join to include that column, waiting 2-3 minutes for it to close. So adding a column to a pipe with 10 merger joins will take 20-30 minutes, most of which is just waiting for edit boxes to close. I've tried the options of "work offline" and setting the ValidateExternalData to false in the merge join property but those don't help. Anyone encounter this problem?
Thanks,
Lee
View 6 Replies
View Related
Dec 21, 2007
I have a form with text boxes and checkboxlists that a user will fill out and click submit. When the user clicks submit, it will update the sql database. In my sql database I have checkbox fields. My question is how can I use the selected items in a checkboxlist to update the sql database individual check boxes. Below is the code I have so far that works for a text box:Partial Class windrockform
Inherits System.Web.UI.PageProtected Sub submitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submitButton.Click
Dim dashdatasource As New SqlDataSourcedashdatasource.ConnectionString = ConfigurationManager.ConnectionStrings("WindrockIssuesConnectionString").ToString
dashdatasource.InsertCommandType = SqlDataSourceCommandType.Text
dashdatasource.InsertCommand = "INSERT INTO IssueLog (initiator) VALUES (@initiator)"dashdatasource.InsertParameters.Add("initiator", initiatorTextBox.Text)
Dim rowsAffected As Integer = 0
Try
rowsAffected = dashdatasource.Insert()Catch ex As Exception
Server.Transfer("problem.aspx")
End Try
If rowsAffected <> 1 ThenServer.Transfer("problem.aspx")
ElseServer.Transfer("confirm.aspx")
End IfEnd Sub
End Class
I am new to asp.net and would appreciate the help.
Thanks,
View 5 Replies
View Related
Mar 14, 2008
Hi
I have CheckBoxList to make my selection as follows:if (CheckBoxList2.SelectedValue == "")
{
strSelect = strSelect;
}else if (CheckBoxList2.SelectedValue == "1")if (strWhere == " where")
{strWhere = strWhere + " pic1 = 'true' ";
}
else
{strWhere = strWhere + " and pic1 = 'true' ";
}if (CheckBoxList2.SelectedValue == "2")if (strWhere == " where")
{strWhere = strWhere + " pic2 = 'true' ";
}
else
{strWhere = strWhere + " and pic2 = 'true' ";
}if (CheckBoxList2.SelectedValue == "3")if (strWhere == " where")
{strWhere = strWhere + " pic3 = 'true' ";
}
else
{strWhere = strWhere + " and pic3 = 'true' ";
}
which mean it will addor remove the fields depends upon the user selection, but it will only select one !!
Thanks in advance
View 3 Replies
View Related
Aug 9, 2004
Hello all. When using a checkboxlist, is each selection under the checkboxlist suppose to have it's own column in the database?
Thank you,
Mike
View 5 Replies
View Related
Aug 18, 2015
I would like to create a table called product. My objective is to get list of packages available for each product in data grid view column while selecting each product. Each product may have different packages type (eg:- Nos, CTN, OTR etc). Some product may have two packages and some for 3 packages etc. Quantity in each packages also may be differ ( for eg:- for some CTN may contain 12 nos or in other case 8 nos etc). Prices for each packages also will be different that also need to show. Â How to design the table..Â
Product name  : Â
Nestle milk |
Rainbow milk
packages  :
CTN,OTR, NOs |
CTN, NOs
Price:
50,20,5 |
40,6
(Remarks for your reference):CTN=10nos, OTR=4 nos Â
| CTN=8 Nos
View 3 Replies
View Related
Feb 24, 2008
Hi,
I'm trying to use a CheckBoxList to display certain records in a Grid View. I have a Grid View, a CheckBoxList with four items and a SqlDataSource and when the user check or uncheck one or more items in the CheckBoxList the Grid View should show records accordingly. I’ve tried to make it work but it’s only the first checked item in the Grid View that has any effect. I use VB. Thanks
View 7 Replies
View Related
Nov 24, 2006
Column1 in table 1 has a range from 1 to 5 (int)
A CheckboxList displays these 5 items. When checked (for example 1 and 4) I want a gridview with sqldatasource=sqlProducts to display the records where column1 values 1 or 4.
When I use the code below I only get the records where column1 values 1....
<asp:SQLDataSource id="sqlProducts" Runat="Server" SelectCommand="Select * From Table1 where Column1 IN (@CBLchecked_items)" ConnectionString="<%$ ConnectionStrings:pubs %>"> <SelectParameters> <asp:ControlParameter Name="CBLchecked_items" ControlID="CBL" propertyname="SelectedValue" type="String" /> </SelectParameters></asp:SQLDataSource>
View 2 Replies
View Related
Oct 17, 2007
Hello,Intended scenario:I have a grid view that displays a particular column using a repeater to display data stored in a separate lookup table. In the EditTemplate I drop the repeater and utilize a checkboxlist to allow for updates to be made. After the sqlUpdate command is processed on the main table I call a sub to loop through the checkboxlist and update the lookup table accordingly. Problem: I can't seem to access the checkboxlist in the edit template. I have a 'updateServices' procedure that is called by the main sql updated event. I call findcontrol on the gridview but I keep getting this error: "Object reference not set to an instance of an object". Here is my code: Protected Sub updateServices(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles sql_respParty.Updated 'Filing type was modified, update lm_Responsible_Party_Filing_Type If FilingTypeChanged = True Then Dim command As System.Data.Common.DbCommand = e.Command 'Insert service_filing_type Dim li As ListItem Dim checkBoxServices As CheckBoxList = grid_parties.FindControl("checkBoxServices") sql_allFilingTypes.InsertParameters("Party_id").DefaultValue = command.Parameters("@Party_id").Value.ToString For Each li In checkBoxServices.Items If li.Selected = True Then sql_allFilingTypes.InsertParameters("Filing_Type_id").DefaultValue = li.Value sql_allFilingTypes.Insert() Response.Write(" check: " + li.Value.ToString) End If Next End If End Sub
Thank you.
View 1 Replies
View Related
Nov 14, 2007
Hi,
I'm trying to insert multiple checkboxlist values from a databound checkboxlist into a SQL Server Express DB.
I need to insert the values JobID and CategoryID into an intermediate table which is made of two columns, JobID and CategoryID, which form the primary key. I'm using the following code:Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim insertCommand As SqlCommand
Dim strConnection As String = "Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True"Dim objConnection As New SqlConnection(strConnection)
Try
objConnection.Open()
Dim ctr As Integer
Dim str As StringFor ctr = 0 To CheckBoxList1.Items.Count - 1
If CheckBoxList1.Items(ctr).Selected Then
str = "INSERT INTO CategoryVacancies (JobID, CategoryID) values (@JobID, @CategoryID)"insertCommand = New SqlCommand(str, objConnection)
insertCommand.Parameters.AddWithValue("@CategoryID", CheckBoxList1.SelectedValue)insertCommand.Parameters.AddWithValue("@JobID", JobIDLabel.Text)
insertCommand.ExecuteNonQuery()
End If
Next
objConnection.Close()Catch ex As Exception
errorLabel.Text = "Failed because:" & ex.Message
End Try
End Sub
I get this error: Violation of PRIMARY KEY constraint 'PK_CategoryVacancies'. Cannot insert duplicate key in object 'dbo.CategoryVacancies'. The statement has been terminated.
It always inserts only the first value of the checkboxlist, instead of looping through and inserting all the rows.
Anyone know what's going wrong?
Many Thanks
View 4 Replies
View Related
Jul 16, 2007
I have the follow, i get the right amout of checkboxes but they all have the same value(System.Data.Common.DbDataRecord)
Dim objconn As New SqlConnection(connstring_MPR)Dim objcmd As SqlCommand = New SqlCommand("SELECT [Parts Master Table].COMMD_CODE as comcode FROM [Parts Master Table] INNER JOIN [Warehouse balance table] ON [Parts Master Table].PART_NUMBER = [Warehouse balance table].PART INNER JOIN POREPORT ON [Parts Master Table].PART_NUMBER = POREPORT.[Part Number] INNER JOIN [DEMAND TABLE] ON [Parts Master Table].PART_NUMBER = [DEMAND TABLE].PART WHERE POREPORT.[PO Bal] > 0 OR [DEMAND TABLE].QTY > 0 or [Warehouse balance table].ONHAND > 0 and [Parts Master Table].M_B = 1 AND [Warehouse balance table].WHSE = 'sgr' AND ([Parts Master Table].FAMILY NOT LIKE 'lam%' or [Parts Master Table].FAMILY NOT IN ('ULTCH', 'REMOT', 'MKSIN')) GROUP BY [Parts Master Table].COMMD_CODE ORDER BY [Parts Master Table].COMMD_CODE", objconn)
objconn.Open()
chkComCode.DataSource = objcmd.ExecuteReader(CommandBehavior.CloseConnection)
chkComCode.DataBind()
objconn.Close()
View 2 Replies
View Related
Aug 25, 2004
I am using the varchar data type in sql to store a comma-delimited string of multiple selections from a checkboxlist.
The string only has about 28-30 characters in it, but it maxes out the sql row length and I get the 8060 error message every time.
Here is some of the code:
"Dim industry1list As String
Dim li As ListItem
industry1list = ""
For Each li In industry1.Items
If li.Selected = True Then
industry1list = industry1list & li.Value & ","
End If
Next
....
MyCommand.Parameters.Add(New SqlParameter("@industry1", SqlDbType.VarChar, 60))
MyCommand.Parameters("@industry1").Value = (industry1list)"
I would appreciate any coaching you have for me to get back on track. Thanks, Bob
View 6 Replies
View Related
Dec 7, 2007
Hey Everyone,
I am trying to create a table that will list data for me. The problem that I have is that my data has been separated across multiple stored procedures. The way I want to display the items are as follows:
title1 title2 title3 title4 title5 title6 title7
item1 item2 item3a item4 item5 item6a item7
item3b item6b
item3c item6c
As you can see, items3 & 6 contain significantly more rows than the others. In order to prevent duplicating items1, 2, 4, 5, and 7, I had to split the statement up into 3 stored procedures; all three procedures take parameters, item 3 and 6 taking item1 as a parameter. How will I display data like that in a report? In the design view, I am only able to use 1 dataset, let alone link them up together.
If this cannot be done, is there a query that I can perform that will omit repeated items? Basically, it will look exactly like about. I thought it was the GROUP BY, but I was way off.
View 9 Replies
View Related
Dec 16, 2006
hi all,
i wonder if could accomplish this problem in sql..
say i wanna total sum up some qty in table 1, and the sum up qty appear in table 2.. means everytime qty in table 1 change, it will sum up automatically total qty in tbl1 :-
table 1
id qty
1 5
2 5
2 5
1 5
table 2
id SumQty
1 10
2 10
note: table 2 will sum up automatically, isit possible to do this?
View 5 Replies
View Related
May 6, 2015
We need to Insert/Update a Fact Table from staging Table. currently we are using a SP which update Fact Table for Each region. this process is schedule, every 5 min job is run and Update fact table.but time of Insert and Update too long from staging to Fact, currently we are using merge statement for Insert and update.in my sp we are looping number how many region we need to update and at a time single Region we are updating using while loop in current SP.
View 7 Replies
View Related
Oct 7, 2015
I have a requirement of table partitioning. we have 10 years of data on a table which is 30 billion up rows on 2005 server we are upgrading it to 2014. we have to keep 7 years of data. there is no keys on table or date column. since its a huge amount of data and many users its slow down the process speed. we are thinking to do partition on 7 years for Quarterly based. but as i said there is no date column on table we have to use reference table to get date. is there a way i can do the partitioning with out adding date column on table? also does partition will make query faster?Â
I have think three ways to do it.
1. leave as it is.
2. 7 years partition on one server
3. 3 years partition on server1 and 4 years partition on server2 (for 4 years is snapshot better?)
View 3 Replies
View Related
Feb 22, 2008
i am trying to get value from a table and put the vale in label control but i have null data in the table. if i have null data then i want the label to have " 1 " as the value.
this is my code. when i run this i get error. Operator '=' is not defined for type 'DBNull' and string "". Dim conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Dim cmd As SqlCommand = New SqlCommand("SELECT MAX(PageHit) From BusinessLog WHERE (BusinessID=@BusID)", conn)cmd.Parameters.AddWithValue("@BusID", strBusID)
conn.Open()
If cmd.ExecuteScalar = "" Then
lblHits.Text = "1"
Exit Sub
Else
lblHits.Text = cmd.ExecuteScalar()
Exit Sub
End If
View 3 Replies
View Related
Feb 2, 2007
I have a table that display large amounts of text in some fields. The table only has two columns (Field Name and Field Data). If the Field data is too large to fit on the same page as the field above it, it pushes to the next page, and then starts printing at the top of that page (the next page down).
I tried setting the "Keep Together" property of the table = True, but this was of no use.
Has anyone found a way to work around this, and if so could you let me know what you had to do. It may just be a SQL Server default setting that cannot be changed. I just want to research all possibilities before reporting back to the users.
Thank you,
T.J.
View 6 Replies
View Related
Oct 25, 2007
does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.
View 1 Replies
View Related
Jul 30, 2015
I have to tables like given below Landing table "A" (Data load will happen over here, No primary keys mentioned over here) table "B"Â .Now I want to move the data from A to B.I have made use of below query insert into B select * from A...Landing table "A" has huge no of records, MS SQL server is taking huge amount of time.any alternative way to make this insertion process faster?
View 6 Replies
View Related
Jul 13, 2007
Inside my SQL 2005 database I have a SmallDateTime with the layout "mm/dd/yyyy hh:mm:ss AM/PM" and then on a selected date of a calendar control it returns the date with 12:00:00 AM which obviously doesn't match with my database's time.
So, I'm looking for a way to drop the time off completely (for the query purpose) the database date when running a select statement. I don't want to touch SQL table data by modifying it, I just want to be able to query sql table using calendar control. Does anyone now how to accomplish this? Thank you in advance. - Nietzky
View 5 Replies
View Related
Jun 6, 2007
All,
Is it possible to Group data in a Matrix exactly similar to Table Control. For example, my table control would group data as follows:
Region Country City $ales
North America
USA
Chicago 4 MM
LA 10 MM
NYK 6 MM
Canada
Toronto 4 MM
while the matrix would display as:
North America USA Chicago 4MM
LA
NYK
Canada Toronto ...
Do you see the problem? The matrix is starting the subgroup at the same level as the parent group. How do I make a sub group start at the row below the parent group row in matrix just like in the table above?
View 5 Replies
View Related
Feb 1, 2007
hi everyone:
the report show two tables two matrixs
how can i control the distance between them
I want to set the same distance between the table and matrix
or (table and table )
View 3 Replies
View Related
Aug 18, 2006
Does anyone have an example of performing a source to destination data load with another SQL Select Statement controlling source statement? What I would like to do is split up a huge data move by performing a loop on the source and modifying the source select "where" clause using values from a control table. I understand how to modify the source statement by using an expression statement with variables. Now I'm trying to figure out how to loop through a control table to drive the source task.
Any tips would be greatly appreciated,
Brent
View 1 Replies
View Related
Mar 10, 2007
Hi, on my local SSRS (RDLC), I have a table which presents several
items, however these are not sequential data from a table on my DB, are
fields of only one row of a table on my DB. More specificly, I have a
table with the fields issue1, description1, issue2,
description2...until 6! I want to present those fields six times (the
same times as they appear on the DB), however, I only want them to
appear is the issuex (which is an integer) is greater than 0. So to
guarantee that each field only appears one time, I do this:
=First(Fields!issue1.Value)
to each table line
And
what I want to do on each line is IIF(Fields!issue1.Value >
0,True,False) to make that line visible or not, however, if I apply
this to a line it automatically applies it to the complete table, and
if only one of this conditions returns false the complete table becomes
invisible.
Is there anyway to make this work dynamically?!?Thanks a lot!
View 1 Replies
View Related
Jan 21, 2015
I am trying to think of a way to read a control table, build the SQL statement for each line, and then execute them all, without using a cursor.
To make it simple... control table would look like this:
CREATE TABLE [dbo].[Control_Table](
[Server_Name] [varchar](50) NOT NULL,
[Database_Name] [varchar](255) NOT NULL,
CONSTRAINT [PK_Control_Table] PRIMARY KEY CLUSTERED
[Code] ....
So if we then load:
insert into zt_Planning_Models_Plant_Include_Control_Table
values ('r2d2','planing1'), ('r2d2','planing7'), ('deathstar','planing3')
Then you would build a SQL script that would end up looking like the following (note all the columns are the same):
insert into master_models
Select * from r2d2.planning1.dbo.models
insert into master_models
select * from r2d2.planning7.dbo.models
insert into master_models
Select * from deathstar.planning3.dbo.models
View 3 Replies
View Related
Sep 9, 2015
I need to put a dynamic table (the amount of rows I control) into a static container (with a fixed size).
View 2 Replies
View Related