Error Numbers

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat Sep 12 00:22:42 CDT 2009


On 9/12/09 1:50 AM, "Greg Olson-Hyde" <greg at hawkmount.com> wrote:

Hi Greg,

>> SHOW VERRORS
> 
> The reason I am asking is that in my old SQLite I have this code:
> 
> If App.EnglishDB.ErrorCode = 19 Then          //19 = New Country is
> not UNIQUE
> MsgBox "You already have the Country '" + pvCountryName + "'."
> 
> This is used to trap for a new record not being unique on insert - I
> am trying to reproduce this in Valentina, so I need to know the code
> for 'not unique'.
> 
> Or is there a better way?

Well, If I'd was on your place, then I did this just by try and see.

Pseudocode

Func

    db.SqlExecute( "INSERT" )

cAtch Exception e

    e.ErrNumber, e.StrMsg   <<<< and just see in the debugger values.

end

Of course you need be sure that you add second time the same record.

Now, when you know exact values,
you can write


Func

    db.SqlExecute( "INSERT" )

catch Exception &HSomeValue

    e.ErrNumber, e.StrMsg   <<<< and just see in the debugger values.

end



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list