On Fri, 2013-10-04 at 22:53 +0200, Willy Raets wrote:

Nando, Fernando and Caveat,

Thanks for your responses.

> 
> Content in 'ICzakgewicht' can be like this:
> | ID | Gewicht |
> 345 100
> 345 100
> 345 50
> 347 200
> 347 200
> 347 200
> 347 200

@ Fernando and Caveat

Above you can see that more than one record can be exactly the same.
At any time only one of them needs to be removed.
With Gambas this can be done, looking for the first record meeting the
criteria, delete it, next update and leave the table.

With SQL DELETE all records that meet the criteria will be deleted
instead of only one.

That is why this is not an option.

> 
> My question, how to prevent this error from happening, preferably
> without having to add a primary key to the table?
> 
@ Nando and Caveat

Seems adding a primary key can't be circumvented, so a primary key will
be the solution.
I'll see what that will do on the VB-client side, but according to
Caveat, that might be not such a problem :)

Thanks guys,

-- 
Kind regards,

Willy (aka gbWilly)

http://gambasshowcase.org/
http://howtogambas.org
http://gambos.org





------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to