Re: Why is this throwing a primary key violation!!?!?



Thanks, I will try that. As for the method name, I thought it was appropriate :P

Guillem wrote:
Hi,

Josh Fraser wrote:


dmShippingAssumptions.SaveAss(qryJobInfo.FieldByName('CustomerID').AsI
nteger);


great method name <vbg>

  qryJobInfo.FieldByName('CustomerID').Value :=
dmCustomer.qryGetCustomer.FieldByName('CustomerID').value;



I suspect the problem could lie here. To check it, supposing your
CustomerID is an integer, try following:

qryJobInfo.FieldByName('CustomerID').asInteger :=
 dmCustomer.qryGetCustomer.FieldByName('CustomerID').asInteger;

if it's another type then use the corresponding AsXxxx method

.



Relevant Pages

  • Re: Amanda Knoxs American law "consultant"
    ... Garrettson spent some time in jail for the Manson murders. ... time that he was a suspect. ... I think that the hard-core interrogation tactics Charlie mentions ... I also NEVER asked him to lie for me. ...
    (alt.true-crime)
  • Re: Joe Adamov passed away
    ... > I suspect that the problem here may lie in the standard practice of ... > anticipating that Mr. Adamov would be passing sooner than he did. ...
    (rec.radio.shortwave)
  • Re: For Sale - Bugei "Lion Dog" Tanto
    ... nature to deceive, but I can suspect. ... Women are expected to lie; ... I have no 'gender problem'- I know exactly with whom I'm dealing, ...
    (rec.knives)
  • Re: Joe Adamov passed away
    ... I suspect that the problem here may lie in the standard practice of writing ... first post could well have been written back in 2000, anticipating that Mr. ... Adamov would be passing sooner than he did. ...
    (rec.radio.shortwave)
  • Re: Manned space flight after the moon landing
    ... > against manned space exploration. ... at talked about it were 'notorious', hence suspect. ... > pro-NASA real experts, unless he adjusted the data to fit his sick ... a very strong motivation to distort and lie, ...
    (sci.space.history)