Hi
I have one Android client trying to insert into MSSQL Server a record using JRDC2.
My android client code command has 20 fields to import.
On config.properties file I have the command
With 20 fields and 20 ?
On my table I have
And I keep getting one error about index 1 is out of range.
Any help to understand why I get the error appreciated
Thank you.
I have one Android client trying to insert into MSSQL Server a record using JRDC2.
My android client code command has 20 fields to import.
B4X:
Sub InsertRecord_NewClients (InsertedMap As Map) As ResumableSub
Dim cmd As DBCommand = CreateCommand("sql.insert_NEW_CLIENT", Array(InsertedMap.Get("ClientCode"), InsertedMap.Get("Name"), InsertedMap.Get("KathestosFPA"), _
InsertedMap.Get("NomikiMorfi"), InsertedMap.Get("AFM"), InsertedMap.Get("DOY"), InsertedMap.Get("Epaggelma"), InsertedMap.Get("Address"), InsertedMap.Get("ZipCode"), _
InsertedMap.Get("Phone1"), InsertedMap.Get("Fax1"), InsertedMap.Get("Phone2"), InsertedMap.Get("Fax2"), InsertedMap.Get("Email"), InsertedMap.Get("WebSite"), _
InsertedMap.Get("Transport"), InsertedMap.Get("PosostoFPA"), InsertedMap.Get("Pricelist"), InsertedMap.Get("ISSYNC"), InsertedMap.Get("SalesmanCode")))
Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
Wait For(j) JobDone(j As HttpJob)
If j.Success Then
Log("Inserted Successfully!")
j.Release
Return True
Else
Log("Inserted Unsuccessfully!!!")
j.Release
Return False
End If
End Sub
On config.properties file I have the command
B4X:
# NEW CLIENT
sql.insert_NEW_CLIENT=INSERT INTO EGM_SALES_NEW_CLIENT (ClientCode, Name, KathestosFPA, NomikiMorfi, AFM, DOY, Epaggelma, Address1, ZipCode, Phone1, \
Fax1, Phone2, Fax2, Email, WebSite, Transport, PosostoFPA, Pricelist, ISSYNC, SalesmanCode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
On my table I have
And I keep getting one error about index 1 is out of range.
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range., Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range.</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /rdc. Reason:
<pre> com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range.</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
Inserted Unsuccessfully!!!
Completed. Success: false
Any help to understand why I get the error appreciated
Thank you.