B4J Question [SOLVED] JRDC2 unique identifiers insert

makis_best

Well-Known Member
Licensed User
Longtime User
Hi

I have a client with one sqlite database who transfer data to one MSSQL Server using direct connection with #AdditionalJar: jtds-1.3.1.jar.
Inside sqlite database I have a table with values of unique identifiers in TEXT fields.
I know that if I use a command like
B4X:
Dim Qry As String
Qry = $"INSERT INTO EGM_SALES
(OrderCode, Gid, InsDate,.... ) VALUES
('${Curs1.GetString("OrderCode")}', CONVERT(UNIQUEIDENTIFIER, '${Curs1.GetString("Gid")}, '${Curs1.GetString("InsDate")}',......)
my job is done.

Now it try to do the same with JRDC2.
So my new command is like
B4X:
sql.insert_ORDER_HEADER=INSERT INTO EGM_SALES_ESFIDOCUMENTTRADE (OrderCode, Gid, InsDate, ...) \
VALUES (?, CONVERT(UNIQUEIDENTIFIER, ?), ?,...)
But I keep getting one error like

What I do wrong?
 
Last edited:

OliverA

Expert
Licensed User
Longtime User
You have only 31 ? in the query, but 32+ parameters that you are passing to the query
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…