View Single Post

   
  #6 (permalink)  
Old 03-01-2008, 03:42 PM
tatata9999@gmail.com
 
Posts: n/a
Default Re: Would special character cause insertion problem?

Sorry for security reason, I have to remove the previous post and
repost it with revision.

The err msg is:
Violation of PRIMARY KEY constraint 'PK__myTBL__772828B3EFCA'. Cannot
insert duplicate key in object 'myTBL'.<P><P>
SQL = "insert into myTBL (col1,col2,col3) values
('342*783','signmeeup728...@student.org','s')" "


Actually sql server has successfully captured one record. Don't know
why it tries to capture it again. It would be nice to have many
simultanous users to use/test it... If you don't mind, http://www.mytata.net/,


Many thanks.


Don

> On Oct 12, 11:01 am, "Jack Vamvas" <DEL_TO_RE...@del.com> wrote:
>
>
>
> > Could you post your stored procedure or code?
> > Are you able to get an output of the sql string that will be used, the one
> > that throws the error.

>
> > --

>
> > Jack Vamvas
> > ___________________________________
> > Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL

>
> > <tatata9...@gmail.com> wrote in message

>
> >news:1192198893.793558.61740@v29g2000prd.googlegr oups.com...

>
> > > Hi,

>
> > > SQL env: sql server 2000
> > > Target column of insertion: varchar(15)

>
> > > Case, a var is made up of a character of the following characters
> > > (random selection):
> > > A,B,C,D,E,$,!,%,^,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U, V,W,X,Y,Z,&,*,(,)
> > > and a few numbers (random selection), and then

>
> > > var = ran1&ran2

>
> > > I'm experiencing intermit sql error
> > > Is it because I did not include the string with quotes like
> > > var = "ran1 & ran2"

>
> > > or the first random seletion may include special character and that
> > > may cause insertion error randomly?

>
> > > Probably the former is more likely. And I've added quotes for the
> > > var (programming language shouldn't really matter, int type usually
> > > without quotes while strings need quotes).

>
> > > What's your thought?

>
> > > Thanks.- Hide quoted text -

>
> > - Show quoted text -- Hide quoted text -

>
> - Show quoted text -



Reply With Quote