Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - stop duplicates...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

stop duplicates...

 Post Reply Post Reply Page  12>
Author
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Topic: stop duplicates...
    Posted: 25 February 2003 at 5:17pm

i know if i say LIKe and stuff for selecting to the database it will look for the record....

 

is there anyway i can hav it from adding a record wit the same name? and if not in the database to add it if it is to not add again just add 1 value to "hits"

Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 5:30pm

What???

 

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 6:58pm
do you ever research this stuff before you ask?
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 7:32pm

i did. and i found a sql that i do not understand. Can some one explian this 1 to me then?

 

this was made by my friend for my site...

 

If rslogin.EOF Then
 SQL="INSERT INTO Member(Name, Password, Email) VALUES('" & Request.Form("name") & "', '" & Request.Form("password") & "', '" & Request.Form("email") & "')"
 Set InsertNewUser = oConn.Execute(SQL)
 response.redirect "login.asp"
Else
 Response.redirect "error/register.asp"
End If

 

is ther another way then insert into cause i dont like that

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 7:46pm

You are right it does not look nice LOL
But to answer your question, there is another way using ado e.g.

rs.addnew
rs("FirstName") = request("FirstName")
rs("LastName") = request("LastName")
rs("FavoriteColor") = request("FavoriteColor")
rs.update
Look into ADO and you find how it's done (dont just apply that to your script...)

 



Edited by michael
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 7:58pm

yea but back to the orig question how do i stop duplicates... lol that just adds on...

 

 

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 10:07pm
you were the one straying off your questions. there are several ways, make the field an identity field, run a select first and if no result THEN insert or buy a book on sql/asp...
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2003 at 10:32pm

ok... can you atleast tell me that code though because i cant go shopping till sunday ...



Edited by skyworld
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.