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:
it will correspond to a field in my ms access database that has a Yes/No data type. when the box is ticked, i would simply like the value Yes to be entered into the database..
i enter other elements of my form (a input text box for example) using Code:
I have a form to enter details about companies into a access DB, it all works fine the way it is set up except this one small problem.
The same company details can be entered again by mistake and take a new record set. Now what I need to know is how to stop this from happening, do I use ASP code to check the DB (if so could someone tell me how it is done) or do I set this up in the Access DB itself.
What I want to happen is if the same company details are entered then the user gets a warning telling them that that company has already been entered.
Is it at all possible to display only one of possible duplicate records from a database in a recordset. The field that needs to be recognised as a possible duplicate is a column for names but then needs to show the one with the highest score only.Fields are name and total (numerical). Currently I have only a basic recorset which is all that was needed until now:
HOw can I prevent my users from entering more the a certain number of characters into a field? Could I get a similar example as I have a limitted knowdlege.
have form on asp page with an email address field, when the user enters their email address I want it to populate another field automatically on the same page, some kind of OnBlur event. Have worked extensively with dropdown OnChange events but cant get my head around this one.
I am looking for some help in writing an ASP script to check for duplicate values in a database. Using a web form to add and edit the records, the user will type/edit the data including phone number.
If the user types in a phone number or email address that is already in the database, I would like an alert box to indicate the name of the person with that phone number when the form is submitted. This is a more user friendly error instead of "Microsoft JET Database Engine error '80004005' ".
Does anyone know how I can use asp to access a specific entry in a microsoft access database table without having to run a search of the entire database? I figure this can be done with the primary key, but I'm not sure how to do it. I've looked for tutorials, but none seem to deal with this.
I have a created a cost reporting system which shows a level-breakdown report. There are three levels in the report the lowest level holds the cost items that are entered by the user these records also have an Entry Date. The level above that is a Sum of the lowest level and the top level is the Sum of the second level. I created the solution using three queries in Access. I then use the queries in ASP to generate the report. But now I need to use the Entry Date at the lowest level to re-generate the report with values from the StartDate to the EntryDate (which is entered by the user).
Question is, can I do this using the construction I use, or do I have to pull my queries to the ASP code and include the dynamic EntryDate? How do I solve this?
I made an asp that I insert records in an MS Access Database. I do insert them allright. But I want to check before inserting if this customer already exists. I try to do that by checking lastname and name (p_eponimo and p_onoma) but seems not to work ....
'Write the updated recordset to the database rsEntry.Update rsEntry.Close adoCon.Close Set rsEntry = Nothing Set adoCon = Nothing
How can I SIMPLY :-) prevent duplicate records from being added? I know I can set the index property on the fields but that mean handling the errors - not sure how to do this. OR I could write the code to seach the DB before update - which may be the only way :-(
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.
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.
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?
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...
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.
I have http://localhost/myweb1 who redirect me to my pages. I would like to have http://localhost/myweb2 which I would like to use the same exact set of pages, except a different global.asa (application data will be different).
If I duplicate pages, that is not a problem, but I would prefer not to duplicate them.
I am developing guestbook using ASP and access. problem is access fields holds max 255 characters. Is there anyway I can create 2 message fields so when first one is full it uses second field. Apart from above any other ideas will be useful. Do you think it's good idea to use notepad to store msgs.
I have an access database with year designations for field names, such 2005 2004 2003 ... and data corresponding thereto. I can formulate a query in MSAccess and it works just fine. However, I am trying to create a web page that will create a database connection and use SQL to create a recordset(s) which I can then manipulate in vbScript.
The problem seems to be structuring a query that will work in vbScript. I have tried several combinations:
rs2.Open "SELECT 2005,2004,2003 FROM Table", conn, adOpenStatic, adLockOptimistic rs2.Open "SELECT '2005','2004','2003' FROM Table", conn, adOpenStatic, adLockOptimistic rs2.Open "SELECT "2005","2004","2003" FROM Table", conn, adOpenStatic, adLockOptimistic
but none of these will extract data.
I have also tried casting these numbers to strings in a string variable, but still no success.
Is there some naming convention I am violating by simply using year designations as field names or is there a problem with vbScript?
How can I figure out an database field maximum size with asp?
Currently the form I am using allows to write too long strings and it corrupts the database of mine. How can I set the limits to be calculated from the database structure?
I can't print the contents of an Access memo field. Every other field type displays fine but this one.
I saw an old thread saying that you should first assign the memo field to a variable but that also doesn't seem to work (please see the attached bit of code). The memo field is "Message". Code:
I have more than one date field on my ASP forms (and in the sister MS Access table) I can not write (created the record in Access table) to the table UNLESS there is date data in ALL the date fields on the ASP form.
I need to be able to have the user enter only one date, then do back at a later time and enter the other date.I am using the short date format in Access table (MM/DD/YYYY) When there is only one date field (on ASP form and in Access table) the date is written and the record is created.
I have a timesheet application I'm working on. The user fills in a form which sends data to an Access db. On the results page I need to display the values from 2 fields; i.e if the user selects "Report Writing" from a drop down list, I need the data contained in another column called 'Codes' to display as well.
I am pulling legislation information and expiry dates from an access database and posting to the web. The expiry dates in access are formatted as Month Day, Year (EG.. January 1, 2006) But when they are pulled from the database to the web, they come out as 01/01/06. I know that the format we have in access is simply a mask, however we require that format be carried through.
This is likely a simple solution, however I am new to ASP and can't seem to locate any information on this. I have searched the forum for related info on this but can't find anything that relates to my specific situation.
Here's the code we are using so far...
Code:
<% Do While NOT Recordset.Eof 'i.e. carry on looping through while there are records Response.write "<tr><td>"'open row and first cell Response.write Recordset("Legislation") Response.write "</td>"'close first cell Response.write "<td>"'open second cell Response.write Recordset("Repealed") Response.write " " Response.write Recordset("Expiry_Date") Response.write "</td></tr>" 'close row Recordset.MoveNext 'move on to the next record Loop %>
I have also found and implemented the following code:
I am planning to migrate my exisiting MS Access program that uses yes/no fields (checkbox). Can ASP identifies checkbox field of ms access? I am planning to use the same database and use msacess for report generation and web browser for encoding to the database.
I have been doing adodb connections and using Access2000 for several lightweight websites. I have never had any problem with any of the SQL commands to insert, update, delete, etc.
I can insert a record into a memo field just fine ... up to a certain number of characters (nowhere near the 65K limit). After several hundred characters, the insert fails ... nothing happens ... the execute just idles and no insert is done. Anyone help? I have read about data types, etc., but everything I read sounds as if ASP and Access 2000 are suppose to handle the type conversions. They have been doing it up to this certain size.
I have a request form that is used for requesting copies og an edition of a magazine. What I need to do is get back the information, from a MS Access table, for the issuedate and deadline.
Because the deadline is not always the same number of days (ie dependant on issue it could be 14 days before, or 21 days before etc), so as well as picking the issue date from the table, I need to be able to get the deadline date back, and write to a seperate Request "field" on the Form. Code: