B4J Question What type of data must be a Varchar? MySql

CanguroCode

Active Member
Licensed User
Longtime User
I have a DB in MySQL and when i gonna write in a field of type VARCHAR (in the DB MySQL) the enninge of DB send to me a error message saying: "Data too long for column" because the data type i use is Char (in B4J).

The code is:

B4X:
Dim Valor2 As Char 

Valor2="Fat"


sql1.ExecNonQuery2("INSERT INTO Xbox(NumeroSerie, Modelo, MarcaLectora) VALUES (?,?,?)", Array As Object (123, Valor2, "LiteOn"))
End Sub

So, what is the correct type should i use?
 

CanguroCode

Active Member
Licensed User
Longtime User
Cool! Thanks, i thought in use the string data type but i said to myself, "is to long for varchar" so, i was confused. Anyway tnks again!

:)
 
Upvote 0
Top