[Gambas-user] error trap an sql insert on a unique column
Daniel Campos
dcamposf at ...626...
Thu Dec 8 00:48:21 CET 2005
I think:
TRY res = conn.Exec(sql)
IF ERROR THEN
Message.Error(Error.Text)
END IF
Should work
Regards,
D. Campos
2005/12/8, john hedge <johnhedge at ...626...>:
>
> Hi,
>
> I'm trying to setup a user input unique code.
>
> If the user enters a non unique code the error message "Query
> failed........." Stop Continue etc. appears and the program exits.
>
> Is it possible to capture this process before this occurs, as in TRY
> conn.Open and displays a relevant message indicating duplication?
>
> I've attached a screen shot which I hope helps show the situation.
>
> TIA
>
> John
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20051208/323e1dbb/attachment.html>
More information about the User
mailing list