Ask a Question related to ASP Database, Design and Development.
-
James #1
Primary Key Violation
Hello,
I have a database that has a primary key for username.
I'm using an ASP page to allow people to register on line,
I have username set as primary key. When they try to
click to add theirselves to the db through the ASP page,
they receive an error - primary key violation. Is there a
friendly way to tell them they cannot add their record
because a username already exist before the SQL Server
message occurs?
James
James Guest
-
Primary Scratch & Windows Primary Paging file?
Okay, I accidentally uninstalled Adobe Photoshop the other day. So I re-installed it and now when I click on the Photoshop Icon and it starts to... -
access violation
I am forced to try to print from an old 16bit vb(3?) program. When attempting to print to pdf, i recieve the following error: ....caused an access... -
HELP ACCESS VIOLATION
System: Windows 2003 Server PHP 5 Final IIS 6 Problem: Every time I run a PHP page I get "PHP has encountered an Access Violation at... -
Add primary key
Hello Barney, "Barney" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:ECCDAF82-099F-4DBE-82A2-FB4F38E9F6DE@microsoft.com... 5,... -
Get Primary Key
How do I get the primary key of a record just enter into the database? Then pass that same primary key ID column value to another table? Example:... -
Aaron [SQL Server MVP] #2
Re: Primary Key Violation
[url]http://www.aspfaq.com/2509[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"James" <anonymous@discussions.microsoft.com> wrote in message
news:1ff5201c45897$393b9a90$a501280a@phx.gbl...> Hello,
>
> I have a database that has a primary key for username.
> I'm using an ASP page to allow people to register on line,
> I have username set as primary key. When they try to
> click to add theirselves to the db through the ASP page,
> they receive an error - primary key violation. Is there a
> friendly way to tell them they cannot add their record
> because a username already exist before the SQL Server
> message occurs?
>
> James
Aaron [SQL Server MVP] Guest
-
Evertjan. #3
Re: Primary Key Violation
James wrote on 22 jun 2004 in microsoft.public.inetserver.asp.db:
sql="select ... where username = " & request.form("username")> I have a database that has a primary key for username.
> I'm using an ASP page to allow people to register on line,
> I have username set as primary key. When they try to
> click to add theirselves to the db through the ASP page,
> they receive an error - primary key violation. Is there a
> friendly way to tell them they cannot add their record
> because a username already exist before the SQL Server
> message occurs?
>
mDATA=cnct.execute(sql)
if not mDATA.eof then response.write "you are known already"
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest



Reply With Quote

