in both databases i get the same error
the stack is simple populate the data from the fields to the database
i am using for this test get revOpenDatabase and the (DBLIB)library http://andregarzia.com/aux/dblibguide/ library from andre.
here is the code i use with get revOpenDatabase in the mysql save button :
Code: Select all
global gConnectionID
on mouseUp
put "katastimata" into mytable
put fld "lat" into zlat
put fld "long"into zlong
put fld "katigoria"into zkatigoria
put fld "titlos"into ztitlos
put fld "eponimia"into zeponimia
put fld "perioxi"into zperioxi
put fld "address"into zaddress
put fld "tk"into ztk
put fld "phone1"into zphone1
put fld "phone2"into zphone2
put fld "web"into zweb
put fld "mail"into zmail
put fld "faceb"into zfaceb
## Now database access should work as exspected:
get revOpenDatabase("mysql", "myIP", "store", user, pass)
if it is a number then
dbSetDefaultConnectionID it
put it into gConnectionID
put "INSERT INTO" && mytable && "(lat, long, katigoria, titlos, eponimia, perioxi, address, tk, phone1, phone2, web,mail,faceb)" && "VALUES (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,13,) " into tSQL
revExecuteSQL gConnectionID, tSQL, zlat, zlong, zkatigoria, ztitlos, zeponimia, zperioxi, zaddress, ztk, zphone1, zphone2, zweb,zmail,zfaceb
put the result into tRes
if tRes is not a number then
answer error "There was a problem saving this record: " & tRes as sheet
end if
end if
end mouseUp
Code: Select all
on mouseUp
put dbGet("katastimata") into myRec
put dbCardToArray("katastimata") into myRec
if field "id" is empty then
get dbInsert ("katastimata",myRec)
if it is a number then
answer it && "New Record Saved"
else
answer error it
end if
end if
end mouseUp
The data in the fields is on the greek language and the databases are utf-8
anyone can help on this ?