Android Question [SOLVED] jRDC2 how to insert multiple field

Discussion in 'Android Questions' started by yfleury, Aug 12, 2019.

  1. yfleury

    yfleury Active Member Licensed 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
    Code:
    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?
     
  2. OliverA

    OliverA Expert Licensed User

    Which dbrequestmanager are you using?
     
  3. yfleury

    yfleury Active Member Licensed User

  4. OliverA

    OliverA Expert Licensed User

    Looks like you're already using the variable j to populate some data in the "insert_client" jRDC2 call
    Code:
    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
    Code:
    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.
     
  5. yfleury

    yfleury Active Member Licensed User

    Thanks I just undertands my mistake.... I have
    Code:
    dim j as stringcursor.getstring("name")
    So I have this error then I change j for j2

    Error gone Or newbe error lol
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice