Please help me to add value from my web server to devise database I am using code like.
a.setDatabase("118.XX.XX.175","mXXXXn","XXXXXX","xxxxxxx")
L= a.Query("select * from TabDate")
For i = 1 To L.Size -1
SQL1.ExecNonQuery2("INSERT INTO datemstr VALUES (?, ?, ?, ?, ?)", Array As Object(i)
Next
I think you need something like this. I did not have a chance to test it:
B4X:
a.setDatabase("118.XX.XX.175","mXXXXn","XXXXXX","xxxxxxx")
L= a.Query("select * from TabDate")
For i = 1 To L.Size -1
Dim MyRecord As String=L.Get(i)
MyRecord=MyRecord.Replace("[","").Replace("]","") 'get rid of brackets in each record
Dim strRecArray() As String
strRecArray=Regex.Split(",",MyRecord)
SQL1.ExecNonQuery2("INSERT INTO datemstr VALUES (?, ?, ?, ?, ?)", Array As Object(strRecArray))
Next
Thanks for your replay, it is not add the value only number of columns is adding in devise database table with null values. when i tried to call strRecArray in message box I got a message like [Ljava.lang.string4a2f9128
please help..
I am guessing that the number of columns in your MySQL remote table does not match the number of columns in your SQLite table which you show it to be 5 in the SQLite table. If you are sure they are the same, then the problem is somewhere else.
i am giving my screen shoots of error and data base. Were u can see the values getting from server and below the table designe of devise database. pl. help me. thanks - manoj
ONLY THE DATE VALUE NOT INSERTED PROPERLY REST EVERYTHING IS o.k. IN THE DATE COLUMN DECLARED TYPE IS NOT MATCHING I HOPE. i WILL COME BACK AFTER CORRECTING THE SAME.