LastError read
only property method
Returns the last error text.
Syntax:
str = object.LastError
Examples:
Set db = Server.CreateObject("newObjects.sqlite.dbutf8")
If db.Open(Server.MapPath("/db/mydb.db")) Then
' Continue with the actual work
' ...
Set r = db.Execute("SELECT * FROM T")
If db.LastError <> "" Then
' Perform some error handling
End If
Else
' Deal with the error further
Response.Write "Error occured: " & db.LastError
' ...
End If
The above piece of code can be implemented also by using On Error
Resume Next. However in script languages that have not enough error
handling capabilities (such as JScript 3.0 or earlier) you will not
have the chance to deal with the error. In such cases you can set
the NoErrorMode property to
True and put the SQLite COM object in non-error mode. This will
allow you to determine if an error has occurred by checking if the
LastError property is non-empty.
Applies to: SQLite3 COM
object
See also: Execute,
NoErrorMode
Supported on:
Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later
|