If I use:
Socket1.Connect("10.100.100.103",123,5000)
it work's
but if I use
Socket1.Connect(strServer,intPort,5000)
It doesn't works, but strServer contains "10.100.100.103" and intport contains 123
See code down
Sub btnConnect_Click
Dim intPort As Int = txtPort.Text
Dim strServer As String
strServer = txtServerIp
Socket1.Initialize("Socket1")
Socket1.Connect(strServer,intPort,5000)
'Socket1.Connect("10.100.100.103",123,5000)
end sub
By the way, a notice I have and hopefully I don't have to change thread. While quering an sqlite db, noticed that when requesting an int field, and the filed is null, I get a 0. Don't know if this is how it goes, but surely it would be nice for me to throw an error (so I can do other things with the null result). For now, my workaround is to request a string and check if it is 'null'.
@mc73: In order to avoid unwanted 0 in a SQLite table insert, update or query, I have started storing field type (data type) as TEXT even for numbers instead of INTEGER or REAL, except of course for a PRIMARY KEY. By doing so, you can still validate numbers before inserts and updates and you can insert an empty string without a 0 popping up when you query the data.
Your friend Mahares
Dear all,
I found the problem.. very stupid I am :signOops: :sign0013:
B4X:
1. Sub btnConnect_Click
2. Dim intPort As Int = txtPort.Text
3. Dim strServer As String
4. strServer = txtServerIp
5. Socket1.Initialize("Socket1")
6. Socket1.Connect(strServer,intPort,5000)
7. 'Socket1.Connect("10.100.100.103",123,5000)
8. end sub