My requirement is, my filed should enforce unique values.Im using MOSS 2007. how to achive this? please guide me.Thanks in advance
View Complete Post
I have a table called 'Permutations' that lists every single combination of 5 numbers that could be selected from numbers 1 to 10.
(the first few rows are as follows, there are 30240 in total):
Number 1| Number 2| Number 3| Number 4| Number 5|
1 | 2 | 3 | 4 | 5
2 | 3 | 4 | 5 | 1
3 | 4 | 5 | 1 | 2
4 | 5 | 1 | 2 | 3
5 | 1 | 2 | 3 | 4
2| 3 | 4 | 5 | 6
3 | 4 | 5 | 6 | 2
and so on.
I want to write a query that only returns the unique combinations of these. So, from the rows provided above, the only rows that the query would return would be
I'll try to make this concise. Anyways, I'm trying to only allow unique data to my database. my database. What I did before adding the entry is to use a Search Query for the value of the txtbox
"SELECT IDnum WHERE IDnum = '" & txtID & "'"
Then compare it with that of the txtbox.
IF objReader("IDNum") <> txtID.textbox then add the entry Else Display a Warning.
in the above code, I can detect the when the user entered an existing value. however, If the user entered a NEW (unique) value an error is Raised "Invalid attempt to read when no data is present" I hit the wall with this.
So what I did, Since I can detect Duplicates and have errors when entering unique value, I used the ON ERROR GOTO statement: I did it like this.
On Error Goto errHandler
If objReader("IDNum") = txtID.textbox then lbl1.text = "Existing Record" objReader.close() Exit Sub End IF
'do the codes to add the entry
I have a situation where I have an IList<T> collection of objects bound to a datagrid. I have one property, name, bound to a DataGridTextColumn. I want to enforce the rule that name should be unique within the collection and was wondering what might
be the best way to do it.
Most of the validation examples I've seen either validate a single cell or else validate a row, allowing you to compare several values within the same row. But I need to validate the value of a single cell based on the values in the entire collection.
I Have 2 levels xml as sections & pages. I'm listing pages under each section normally using XmlDataSource, DataSourceId and XPathSelect in my repeaters. But I had a problemwhen I tried to only select the page with new="True" under a sipicific section. so I tried the following tags:
<asp:repeater id="rpFeatured" DataSource='<%# XPathSelect("page[@new='True']") %>' runat="server">
<asp:repeater id="rpFeatured" DataSource='<%# XPathSelect("page[@new=\'True\']") %>
And Even solutions onhttp://forums.asp.net/t/1181619.aspx
I'm on ASP.Net Framework 4.0 using VS 2010 & VB.Net
Is there anyway to fix that whithout using the code behinde?
Thank You all in Advance
I need a way to create unique values for a property in my custom server control..
In this case I will have the poroperty called "Name" and I neeed the value of Name to be unique for each "instance" of the control...
So for instance if I have a page with more then one instance of the control, I dont want the value of the Name property for these instances to be allowed to be the same..
...to put it kind of simple, if I dont remember this incorrect, I want it to be sort of like the ID property..but with another name then ID..
Anyone has any idea how to do this?
Thanks in advance!
i got some samples and i did autocomplete using jquery , its working well for single input values
but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple
values in the textbox for autocomplete in jquery in asp.net?
I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx). The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page.
However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML, Divs and databound gridview content. The HTML content will be stored in the database.
Can someone point me in the right direction for best practices on how to accomplish this?
I am hoping somene here could advise me on a better solution to my present problem. First a little background information on the application.
I have a web application using the 3.5 framework. The structure of this application is as follows: UI -> WebService -> Business Layer -> DataAccess Layer. What I want to accomplish is for every request (click on a link or button) have a unique identifer that follows this request through its entire lifecycle. This unique identifer can be accessible anywhere within this request. We use Response.Redirects which could easily be changed to Server.Transfers (although I do not want to do that) but the problem lies with the web service calls. Currently, a GUID is set in the ApplicationRequest. This GUID checks for a guid value in the RawURL and if so, assigns this value to a HttpContext Item. If not, HttpContext.Items gets a new one created. However, this idea is wrong and will need to be revisisted. The bigger problem is with the web service calls. Without changing every web service method signature, and every call for that matter, is there a way of getting this GUID there. I created a web method in every web service so that each time I instantiate a web service object in the UI, before calling any
This is quite strange. here is the issue:
1. I'm using a multi-select jqgrid.
2. I have my own delete button to delete multiple orders
When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.
Here is the code:
I'm working with VS2010 Beta2, ASP.NET and Dynamic Data. I'm using VB but will certainly be happy to receive a C# example if necessary.
I used a few of Steve's examples (Writing Attributes and Extension Methods for Dynamic Data and Dynamic Data - Hiding Columns in selected PageTemplates) to create a custom property attribute to be applied to a dynamic data column and want it to accept an array of enum values (each value will represent a dynamic data page template where this column should not be displayed). My new attribute works fine when I hardcode it like this, meaning the HideColumnIn attribute is properly populated with the array of enum values:
<HideColumnIn(PageTemplate.List, PageTemplate.Edit)> _
Public Property My_DD_Column As Object
However, I want to store the values to be used for the HideColumnIn in the DB as integer values that correspond to the
how to pass the value from one page to another page in asp.net with out Using State Management Concepts?
Like 1. cookies
With out using the above should pass the values...
I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)? The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.
The front end could handle it; where the user would enter text, it's validated, then a query is done to see if that username is available. If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats. With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.
Is this the correct way to handle this?