Avoiding Duplicates
I have a string value which has the bellow content.
Dim aString as string
aString = "1,2,4,2,2"
where aString is a parameter set dynamically based on the user loggin into the system. Now All I want to do is to eliminate the duplicates. ( In this case I need to keep only one "2" and remove the remaining "2" , so my final string should be "1,2,4" ).
How could I do that. I was thinking of an array, but the issue is, If the "aString" is empty I believe array will return a error. So any other way of doing ?. Or simple asp functions which will eliminate this.
View Replies
ADVERTISEMENT
I want to avoid using a RDBMS because I don't have time to administer a real database if something goes wrong (for a free website).
So when ever a user submits information, it will dump into a unique html file. Then a link will be created to it on the home page. I am concerned about locking the homepage incase more than one user needs a link created at the same time.
Any suggestions on how to handle this? The user information is not confidential and is for public posting so I'm not concerned with securing information and logins.
View Replies
View Related
We are using ASP.NET on IIS5 to process requests
in a database.
How can one make choices in the .aspx based on
if a user has or hasn't changed a field? Is it possible
to control the ASP.NET environment by use of
some client side scripting ( ?changes=yes to URL)
or is there a way to tell in .aspx which Label elements
has changed?
Only solution i can think of currently is to query the
DB and then do an field by field comparision. Is that
the best way?
View Replies
View Related
If a form is situated in normal HTML then a paragraph tag is inserted after the Submit button.
If the form is placed in a table then the preceding paragraph tag is supressed but the trailing paragraph space is still inserted.
Any suggestions please?
View Replies
View Related
When we print an HTML page from the browser,the Page Number at Top righ) and page URL At bottom is printed.
How can we avoide these information so that our page print out look similar to a simple printed page same as word document?
View Replies
View Related
I asp.net pages that run on an intranet IIS server. Some op the pages use
XLM DOM doc.Load(sPath) to open and parse a XML file. Every time the
doc.Load(sPath) executes in IE6 a warning message comes up
"This page is accessing information that is not under it's control. . . "
How can I avoid this message. It is a great anoyance to the users. Do I
need to create some time of certificate to pass...
View Replies
View Related
I have 4 ASP pages where an user can update some fields and submit the page, so that the fields are updated in the Database(Sqlserver), I need to handle one situation.
1) At a time I need to allow only one user to update the details in a page.
2) I need to stop other users who are trying to access the same page concurrently(probably with a message or Redirecting to other page where he can see the details in a report format).
3) Session timeout in my application is 60, So if the first user leaves the page open for a long time , I think it would be a problem....the other session has to wait for a long time.
I have no choice in decreasing the session timeout interval.
Please suggest , How can I handle this in ASP.
View Replies
View Related
As part of a data input script, I ask for a user name to be input into an Access DB field called surprisingly, "UserName". I would like to ensure that username is not duplicated. How do I do that before inserting the data. My example show in the incomplete script below doesn't work? Code:
View Replies
View Related
I am required to prevent duplicate posts........how can i do this?? my database is MS Access and am using ASP.
Have been scratching my head fo quite some time now........cant figure out the logic.
I understand i cant limit it from the database....if possible i'd like to know how to handle the error that it would give with a page with message
or how can i compare the entry from the database before i post it
View Replies
View Related
How to write asp code to remove duplicates in an array.
For Eg: A()=(1,5,10,15,10,20,5)
After removal of duplicates it should be
A()=(1,5,10,15,20).
View Replies
View Related
A member logs on and enters a record, if one already exists for that date, then they get a message saying so. If not the record is added and some text is displayed. But it still allows me to enter records even if one already exists! is it because I am storing my dates as strings? Code:
View Replies
View Related
I have an array like this:Code:
arrColour = split("blue,blue,green,red,purple,blue,green,yellow",",")
What I need to be able to do is to remove all items of the value "blue" from the array. I can just run a dictionary function to delete all duplicate values, because some of them need to be retained. I just need to delete all of them of a particular value. how this can be done?
View Replies
View Related
I have declared a multidimensional array as follows. dim parray(100,5). Now this array contains some duplicate values. So how to remove duplicate values in this multidimensional array.
View Replies
View Related
a way i can remove recordset rows that have identical entries in a column?
View Replies
View Related
I've got a form that allows the user to search a table for data and if it finds that the data is not there, it should insert what is missing into a new table. But I'm not sure as to how I would check the records before I insert records. Code:
View Replies
View Related
I have two very simple Access tables:
tblNewsletter
==========
ID | Email
tblSaved
==========
ID | Email
There are thousands of records in each. I need to check for duplicate email addresses across the two tables and remove them from tblSaved if they appear in tblNewsletter.
How do I go about doing this?
View Replies
View Related
I have a permission tracking app that I am working on, and I have made the insert page for it. I am having issues on how to prevent duplicates from getting entered.
Currently the interface for the app has a mixture of select boxes, list boxes and checkboxes. The form submits the page to processAIMR.asp and then does the inserting. I am using a loop to insert a new record for each checkbox checked or listbox entry selected. Code:
View Replies
View Related
I have an array which is made up of a selection of place names, such as "London, London, Lisbon, Paris, London, Madrid, London, Madrid", what I need to do is loop through the array and get it to find out which item is duplicated the most times, and then have this item equal to a variable, such as TopPlace, which in this case would be TopPlace = London, I have no idea how to achieves this, could someone offer me any help on doing this?
View Replies
View Related
I have a array arrNames --
Is there any easy way that I can check that no duplicates exist in the array and if there are duplicates return the name that is a duplicate?
View Replies
View Related
i have created an array from recordset containing user names eg. (davidp, davidp, evenf, patricka, rebeccah). which i have sorted in alphabetical order, but i need to
identify duplicates in this array and the number of times it has been duplicated.
View Replies
View Related
I am pulling some records out of a database which have a Description field containing several words, and storing this information in an array using GetRows().
Then using a for-next loop I am going through these records and using the Split() function to get the first word of the Description and then adding it as an option to a dropdown list.
The problem is I get lots of duplicates in the drop down because lots of the descriptions have the same first word. Using DISTINCT in the SQL statement won't help much because at that stage the descriptions arent the same. Code:
View Replies
View Related
I am returning a list form a db: this could be 1,2,3,4,12,67,1,2,34 so basically I am looking at how to remove the duplicates before doing another select. I saw a thread here with a funciton to do this bu it does not seem to work.
View Replies
View Related
I have a string like so:
Fruit (apple) (pear) (banana) (pear/orange/apple)
I need a regular expression that will parse it into the following:
apple / pear / banana / orange
i.e. separate them all by a forward slash and remove duplicates.
View Replies
View Related