Android Question [SOLVED] jRDC2 how to insert multiple field

yfleury

Active Member
Licensed User
Longtime User
Hi all
I want to backup my table to jrdc2 server row by row
In client side I have this error
Current declaration does not match previous one.
Previous: {Type=String,Rank=0, RemoteObject=True}
Current: {Type=HttpJob,Rank=0, RemoteObject=True}

on this line
B4X:
Dim cmd As DBCommand = CreateCommand("insert_client", Array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)

I have many different fields like string, int and double. With this error I don't know how to do an insert on jrdc2 server. Any hint?
 

OliverA

Expert
Licensed User
Longtime User
Which dbrequestmanager are you using?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Looks like you're already using the variable j to populate some data in the "insert_client" jRDC2 call
B4X:
Dim cmd As DBCommand = CreateCommand("insert_client", Array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u))
From your error message, at this point j is a String variable.
Then you try to re-declare j as an HttpJob
B4X:
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
This explains the error message. Solution, either rename the String variable j to something else or rename the HttpJob variable j to something else.
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
Thanks I just undertands my mistake.... I have
B4X:
dim j as string= cursor.getstring("name")

So I have this error then I change j for j2

Error gone Or newbe error lol
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…