Creating Unique Usernames For Users Of A Database
I am tryin to create a database of users for my system,each user is given a username based on their own name(surname and first name), however if 2 users with the same or similar name enter their details they will be given the same username,for example john drew would return drewj as thier username, so would jack drew, when a new user is entering their details how do i check that the username generated for them does not already exist,i.e i need to compare the username generated for the new user with all usernames already held in the database,if the username does already exist i want to add a digit to the end of the username how is this done using asp?
View Replies
ADVERTISEMENT
Very ill today so unable to concentrate and need some help with some fairly simple stuff...
Below is standard code on my page which is recieving variables from Flash and imputting them into a database.
What i need this page to do is to and your help doing it is:
1. Check if the email address exists in the dbase?
2. If it exists then to update the field 'High_score'
3. If it doesnt exists then to create a new record and input as the code below does.
View Replies
View Related
is this possible? AD being active directory...
View Replies
View Related
how to create a spreadsheet with info from a database. Is there a way to create the spreadsheet on the users computer instead of on the web server? I want to prevent a whole lot of xls files from being created and stored on the server.
View Replies
View Related
We are trying to create a basic "signup for demo download" where user enters info, gets an email with user/pass to go and ftp download the demo.
FTP currently is using NT security. Is it possible to create an NT user from ASP? Or is there any other tactic that is more standard?
View Replies
View Related
Have an asp form created and I need to assign a unique id number to each submission. Can this be done w/o a db?
View Replies
View Related
I have a login pages right now that prompts the user for login and password and redirect the authenticated user to a URL (see code sample below).
Now instead of this I would like it to pick a URL (different for each user) listed in my access database (URLredirect) and redirect them to their personalized homepage. How can I solve this problem? Can anyone guide me in the right direction? Code:
View Replies
View Related
I am trying to run a script that will add users to a database so they can register with the site. ive got it working so that the users are added however i am trying to prevent people from registering the same username or email address and this is not working.
the script firstly checks that the user has filled out all the fields in the form from the previous page then the script is supposed to check the database for the username and email then adds the user if it is all ok however if the fields have all been filled out it simply adds the users anyway. here is one of the check scripts i am using VBscript and an access database .....
View Replies
View Related
I am using an application I have put together which unfortunately uses an Access database. I say unfortunately, as I have got a lot of users hitting the db at the same time - inserting and updating... plus retrieving information.
Is there a way I can safeguard inserts and updates or at least have more friendly error pages so that the user can retry to send their data... ? I don't want pages to simply fall over because there are too many users.if this is possible. Even if there is a delay or some other technique I can employ, so that inserts can be queued?
View Replies
View Related
Basically I have a site where the administrator adds new students to a college system. This code just adds a new student to the database. When they are added a username is generated by taking the first letter of the forename and the first from the surname and joining them to the date.
(ie, James Brown would generate JB2005) Obviously some people will have the same initials so i'm trying to get all the records from the student table in my database that has the first two letters as the student I'm trying to add and adding the value of the count of that recordset before the date of the new students initials. (ie, if Jane Bennett was added the username would be JB12005 because there is already a user with the initials JB in the database)
At the moment if i add a new member to the database, the fields are populated but the count of the recordset is not added so I end up with duplicate usernames. I'm not sure if the recordset is even being filled or whether the recordcount is not working. Code:
View Replies
View Related
I have an access dbase that holds and an expiry date. I need to compare the expiry date with the current date and if it is later than the current date it will allow access (if the username password is correct of course)otherwise it will display an error message saying that membership has expired.
View Replies
View Related
When more than one user tries to access my system, one user gets his page processed, and the other users recieve an error message stating:
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.
/processweb/html/cpr/admin/sel_sc.asp, line 25
I am using ASP 2, MS Access 97 and IIS 4. Any ideas why only one user is allowed to access the database simultaneously? The database file itself is closed.
I have a hunch it may be because the IUSR_[machine name] user account on the web server does not have access to the *.ldb database locking information file... Does this sound like a plausible reason?
View Replies
View Related
Basically everytime I need a page to access a database I will create a connection object, and then at the end of the page I will close the connection object.
Would it be more sensible to create all the connections to the database that a user will need when they first visit the site, and then close these connections once they leave the site. (Using something to do with Start Session and End Session).
View Replies
View Related
What's the best way to implement a secure passwords. The passwords already exist but i want the users to then change them.
View Replies
View Related
How can I prevent this from happening? For example when the asp
application works in a public terminal where we don't want successive
users to know the login password and user name of the previous ones?
View Replies
View Related
i'm having trouble finding the syntax of the create database..can some give me a link or something??
View Replies
View Related
I want to be able to log in a database any transactions my users perform. For example logging in, requesting a page, downloading a resource, logging out etc.
What is the most practical way to code this? I was thinking of trying to use an include file which would have a function to add a log in the database for each page on the site or when a particular action is performed.
View Replies
View Related
I want to create a database and its tables and populate it through a web page, using ASP. The database is MySQL on win32 (4.10.13-nt) and the driver is MyOLEDB 3.0.
One thing, to set up the ole-db connection, it seems I have to specify a data source, which is an already existing database.
The Connection works and I actually can create the database, but the code for the table creation generates a 500 server error. The SQL itself is taken straight out of MySQLcc query window, so I know it's all good, syntactically.
(Also, regarding the connection, I can connect to and read from an existing database. It's the table creation that seems to be the trouble.)
I did a response.write to the page to make sure that the code coming out is what went in and that is the case. So, I guess one question is, what could be different about creating tables in a db that would fail, when "create database test_links;" and "use test_links;" both complete successfully (and the newly-created database shows up, just no tables in it).
To test the sql, i made three strings of SQL and executed each of them sequentially. The first two work, the third (table generation) fails.
A second question is, is there a way to capture any error message that might be generated at the MySQL end, rather than having the page bomb out; and then display the error. I tried using a RecordSet object, that didn't work, the page still crashes.
View Replies
View Related
Is it possible to create a database of any sort not only Access using nothing but code?
To this day I still create databases using Access on my hardrive then upgrade them and use code to modify them... would be very convinient if there was a way to just create with ASP code and edit from ASP as well...
View Replies
View Related
i have to do a code in ASP that including this code:
set c=server.createobject("adodb.connection")
c.open "dsn=MyDSN;"
c.execute "create table first_tables(Name char, Tel char)"
and i am geting that error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[Microsoft][ODBC Text Driver] Cannot modify the design of
table 'first_tables'. It is in a read-only database.
/1.asp, line 4
what can i do?
View Replies
View Related
Does anyone know of a database system available in which users could establish a user name and password to register products, buy merchandise and access a message board? I have moderate asp skills, but have no idea how to write or where to purchase software to create this database.
View Replies
View Related
I need to create a chart/graph with the following data from my database:
Each record is opened and then closed at a later stage. I then calculate the time it took from when the record was entered to when it was closed.
Now i need a pie chart to display how many records was closed in certain times. for example 10 records was closed within the first 10 minutes, 2 in 20 minutes and so on.
this also is to happen for dates that the user entered. i.e a Weekly report and a monthly report.
Any advice and help will be appreciated. I found alot of examples of hardcoded graphs but none extracting data from database.
So first i need to count the records that fits each section of minutes and then use that data to draw my graph?
View Replies
View Related
I am using a repeated field to bring in to my page repeated records, and I have been able to retrieve values that are entered into text boxes that are associated with these repeated fields. I would like to post these values into a database, but I'm not sure how to set up my table as I know that each employee's values as well as number of fields will be different.
I thought about setting up two tables. One that houses the dynamic question and the other to house the answers, but I'm not sure if that will work. I could really use help as to the syntax to write a loop statement that will insert my returned variables and create the field names dynamically into my database table. I believe this is what i need to do.
View Replies
View Related
I want to create a breadcrumb trail on a site, but instead of being
generated by cookies or a directory structure, it needs to be database
driven. My website details hundreds of products, each belonging to a
category. Each category can belong to a parent category, and so on.
My site will feature master/detail pages, and both need to feature a
trail, e.g.
Books > Hobbies > Sport > Football
The master page will list all items within the current category, and the
trail will allow the user to click to any parent category for a wider
listing.
The detail page will show the item detail, along with a full trail to
the category/parent categories it belongs to.
The category structure will grow over time, and different branches will
have different number of levels so it needs to be maintainable.
View Replies
View Related
I have created a database connection function which I use to open my database connection and recordset and another to close it. Easy stuff I know. The problem is this.
I want to be able to create database conenctions and recordsets specifically when I call the function. For example Code:
View Replies
View Related
I am using an Access database, and for a field called size the client entered some values such as 20" x 20" Unfortunately when I try to print that field to the page, the cursor stops typing at 20 because I'm assuming it considers the first " inside the 20" x 20" to be the end of the string.
I am simply trying to print the whole string <%=(rsProdsUpdate("size1"))%>
Is there a workaround this without having to change all the values in the database?
View Replies
View Related
I need help with some asp code that would allow me to grab the last record id and add one to it for the new record being inserted.
I am new to asp and have been banging my head up against the wall trying to get this to work. I am currently using Visual FoxPro 6 for my database.
The SQL statement I am trying to use is:
strSQL = "SELECT Max(contact_id) FROM CustomerContact;"
View Replies
View Related
i'm building an ecommerce website and I want to create a unique orderID for each new order. My problem is that I don't want to have a random number but a number where each orderid is one higher then the last order like for example 4850323, 4850324, 4850325....
I tried to do this by using an application variable where 1 is added after every order but
this doesn't garantee a unique number because if IIS is reset it also resets the application variable.
View Replies
View Related
I've a databse of product in which I've unique ProductCode plus a ID that increments by 1 (AutoNumber). both the code and ID are unique and there will be no duplicate but is it worth having both in the databse?
I mean, can I not just use the productCode and forget about the ID? does this makes any difference? as far as I can see I'll have no problem in using the ProductCode. how you'd do it.
View Replies
View Related
Whats the best way to create a Unique ID and insert it into a Access DataBase? the field that holds this is a text field, and is called company ID.
Its a text field because it seems to cause less hassle
View Replies
View Related
I have a list from a database which I have made into a dropdown box, with each option as one line from the list.
At the moment I have several repeat values which I do not want.
I can set up a series of nested if statements and loops to remove the duplicate values but I would expect there to be a function which does this much more easily.My question is:
Is there an easy way of only displaying unique values from a database using ASP and SQL.
View Replies
View Related
This is about a simple form validation in asp using javascript.there is one field called invoice_number which requires an unique invoice number as input. Whenever user inputs duplicate values message should pop up as warning on submit of the form. A sql fetches all the invoice nos. from database into an array using getrows.how do i use the result of getrows in javascript to perform client side validation
View Replies
View Related
I am trying to find a best algorithm to generate unque id(alphanumeric less than 10 character long - not GUID) for entering orders in orders table for an e-commerce site.
View Replies
View Related