API2 DatabaseException not working

Im still using old API1 releases, each time Im considering to upgrade to a new release I found LOTS of bugs just minutes after star mocking something.

Why implementing Exception in Databases if Exceptions are not even raised?

https://tracker.xojo.com/xojoinc/xojo/-/issues/74612

MySQLCommunityServer.Error is deprecated but it still working better than the new API2 things

It helps if you actually use an API2 method, rather than an API1 method. See the Issue.

1 Like

Ok, using ExecuteSQL does raise the exception. web 2 was not suposed to be API2 only? :expressionless:

Web 2 controls are API 2. Classes that are shared across project types are as they always were for backwards compatibility. Classes that have both sets of API commands like Database and Timer can still use their API 1 functions if you write them. They should not show up in Auto Complete though.

For Database, this means that Exceptions are not raised.
For Timer, that means you can use the Integer Mode property if you so choose.

To further illustrate: WebTimer, the new class created for Web 2.0 uses the awful renamed event that no-one wanted.

Edit: Small punctuation and formatting change for clarity

1 Like

If you write for example, msgbox in desktop, it works. But on web 2, it tells you that it doesnt exists.

But yeah, looks like other classes are just a mess.

MsgBox / MessageBox is not shared amongst the project types the way Database and Timer are. I don’t have the right words to describe the difference, maybe Norman does. You might try asking on that other place if you are interested in the semantics.

simba-lion-king

1 Like