Is there an example?
Which database do you need to connect to?
Usually you can use our MBS Xojo SQL Plugin to do SQL databases.
You could just copy and paste code from our examples into a web app:
- /Java/JavaDatabase/java Database Thread Tests
- /Java/JavaDatabase/JavaDatabase MDB
- /Java/JavaDatabase/JavaDatabase MySQL Blob and Clob
- /Java/JavaDatabase/JavaDatabase MySQL test
- /Java/JavaDatabase/JavaDatabase MySQL test with Threading
- /Java/JavaDatabase/JavaDatabase MySQL with JavaInputStreamMBS
- /Java/JavaDatabase/JavaDatabase SQLite
- /Java/JavaDatabase/JavaDatabase SQLite blob
- /Java/JavaDatabase/JavaDatabase to JSON
- /Java/JavaDatabase/JDBCMultipleDrivers
It is a third-party database with jdbc. In web applications, I declare that JavaConnectionMBS can be used in the app. HandleURL in the app, and add the app. dmDB. VM. FreeCurrentThread when returned. Only one query can be used in the session, and the program crashes and exits (Linux/macos)
You may run into problems with multiple threads.
What if you don’t call FreeCurrentThread?
Do you get exceptions?
Solved the problem. Call dim r as JavaResultSetMBS in sesson. After the query, you need to set r=nil.
thanks
1 Like