Setting a unique key field in a relational databse depends on the database
vendor. If your databse does not support it, you have to add sql statements
which check if there is an entry alreading existing with a value you want to
add, otherwise your jdbc.exec will give you an error.

"Mohsan Khan [EMAIL PROTECTED]" wrote:

> Hi
>
> I want to set the "id" as an COUNTER PRIMARY KEY, how do I do that ?
>
> stmt.executeUpdate( "CREATE TABLE " + companyName + " (id
> COUNTER,fnamn TEXT(50),enamn TEXT(50),alder LONG NOT NULL,kon
> TEXT(50),adress TEXT(50),postnr TEXT(50),stad TEXT(50),land
> TEXT(50))" );
>
> thanx
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to