Re: auto increment not working

2004-04-23 Thread Nilesh



Thanks Glenn,
 Yes I am using OJB rc6. And I have also tried without
using any sequence manager. Do I neeed to create my own sequence manager.
How will it help and how do I do that ? Please tell me if you have any idea.

Thanks again.


Regards,
Nilesh.






- Original Message -
From: "Glenn Barnard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 8:56 PM
Subject: RE: auto increment not working


> Your settings look good. I use this technique with MS SQL Server and all
is
> working well. Please note which version of OJB you're using. Hopefully,
its
> rc6!
>
> >From: "Nilesh" <[EMAIL PROTECTED]>
> >Reply-To: "OJB Users List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >CC: <[EMAIL PROTECTED]>
> >Subject: auto increment not working
> >Date: Sun, 22 Feb 2004 19:40:34 +0530
> >
> >In my OJB (using  PersistenceBroker ) application auto-increment is not
> >working.
> >
> >I am using  MySQL in which I have also used the auto-increment constraint
> >for the Primarykey ( bigint(20) )
> >
> >
> >For my database definition i have used the "SequenceManagerNativeImpl"
> >
> >  
>className="org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl">
> >  >attribute-value="true"/>
> >  
> >
> >
> >also in the mapping file  i have
> >
> >  >class="com.haystack.emailmarketingchoice.member.MemberVO"
> >table="tblMember">
> >
> > >jdbc-type="BIGINT"  primarykey="true" autoincrement="true"
> >access="readonly" />
> > 
> > 
> > 
> >
> >i have also tried without the  --> access="readonly"
> >
> >but it generates a new 20 digit  "auto-increment" number  only for the
> >first insert, for the subsequent inserts it generates the same number and
a
> >Duplicate Entry error arises.
> >
> >I have also tried the following sequence managers
> >
> >SequenceManagerMySQLImpl
> >SequenceManagerSeqHiLoImpl
> >
> >with and without these attributes
> >   
> >   
> >  
> >
> >
> >
> >But ALL Failed.
> >Have any one of you tried this. Please let me know.
> >Thanks in advance for your interest in my problem.
> >
> >Regards,
> >Arjun.
> >
> >
> >
> >
> >
> >
>
> _
> From must-see cities to the best beaches, plan a getaway with the Spring
> Travel Guide! http://special.msn.com/local/springtravel.armx
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



auto increment not working

2004-04-23 Thread Nilesh
In my OJB (using  PersistenceBroker ) application auto-increment is not working.

I am using  MySQL in which I have also used the auto-increment constraint for the 
Primarykey ( bigint(20) ) 


For my database definition i have used the "SequenceManagerNativeImpl" 

 

 


also in the mapping file  i have



   


 

i have also tried without the  --> access="readonly"

but it generates a new 20 digit  "auto-increment" number  only for the first insert, 
for the subsequent inserts it generates the same number and a Duplicate Entry error 
arises.

I have also tried the following sequence managers

SequenceManagerMySQLImpl
SequenceManagerSeqHiLoImpl

with and without these attributes
  
  
 



But ALL Failed.
Have any one of you tried this. Please let me know.
Thanks in advance for your interest in my problem.

Regards,
Arjun.