B4J Question jRDC2 - A question of being on the safe side. To ExecQuery2 or ExecNonQuery2?

Mashiane

Expert
Licensed User
Longtime User
Ola

At the heart of it, JRDC is using ExecQuery2 and ExecNonQuery2.

Forgive my rusty head. I just want to conform something from the masters here. For each of these calls, which method is correct to use given the two?

For example, using this with jRDC2Utils, this is the flow.

B4X:
ExecuteQuery> ExecuteQuery2 > ExecQuery2
ExecuteBatch> ExecuteBatch2 > ExecNonQuery2

So if my SQL calls are the following, am I making the right assumptions here?

B4X:
SELECT - ExecuteQuery
SHOW DATABASES - ExecuteQuery
SHOW COLUMNS- ExecuteQuery
DROP TABLE - ExecuteBatch
CREATE TABLE - ExecuteBatch
CREATE DATABASE - ExecuteBatch
TRUNCATE TABLE - ExecuteBatch
INSERT INTO - ExecuteBatch
REPLACE INTO - ?
DELETE - ExecuteBatch
UPDATE - ExecuteBatch
SELECT INTO - ?
PRAGMA - ExecuteQuery

Please advice and thanks in advance for your responses?

Thx
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
m I making the right assumptions here?
yes

REPLACE INTO - ?
This will be a executecall actually, but i guess its okey to do an execquery as you will be expecting a resultset

SELECT INTO - ?
Same for this.

PRAGMA - ExecuteQuery
i guess pragma is for sqlite? then it should be nonquery as you are not expecting a resultset
 
Upvote 0
Top