Hi All,
Mysql has a nice function to load a file and insert this in a field in the table.
LOAD_FILE.
Why is this not working when I use this
This a part of the SQL Query called with
Full Insert or Update Query Working With MySql Query builder.
All Fields are inserted but not the Image.
Mysql has a nice function to load a file and insert this in a field in the table.
LOAD_FILE.
Why is this not working when I use this
This a part of the SQL Query called with
B4X:
"', UserImage = LOAD_FILE('" & Functions.ImageFileName.Replace("\", "/") & "')"
Functions.SQLDB.ExecNonQuery(tmpSQL)
Full Insert or Update Query Working With MySql Query builder.
B4X:
tmpSQL = "INSERT INTO axusers SET Name = '" & txtName.Text _
& "', Password = '" & txtPassword.Text _
& "', UserName = '" & txtName.Text _
& "', Comment = '" & txtName.Text _
& "', UserLevel = '" & tmpLevel _
& "', Client = '" & txtClient.Text _
& "', UserCard = '" & txtTag.Text _
& "', Departement = '" & txtDepartement.Text _
& "', Location = '" & txtUserLocation.Text _
& "', UserImage = LOAD_FILE('" & Functions.ImageFileName.Replace("\", "/") & "')" _
& ";"
Functions.ConnectToDB
Functions.SQLDB.ExecNonQuery(tmpSQL)
'
Last edited: