[Gambas-user] not record string in my database
Wsouzap at ...87...
Wsouzap at ...87...
Tue Dec 7 20:32:06 CET 2004
Hi!
I'm use mySql wih gambas and when a use this above function, d'nt record and say error message.
I think is the string returned for zCripta, because if im supress the string not ocours the erro.
FUNCTION zCripta(cSourceString AS String) AS String
DIM Cz AS NEW Compress
DIM Buf AS String
DIM SourceString AS String
Cz.Type = "bzlib2"
'* The PAD function is to left pad string and CRIPTANome is to cript strings for my secret code
SourceString = organiza.PAD(winger.CriptaNome(cSourceString),0,255)
Buf = Cz.String(SourceString,Cz.Max,FALSE)
IF Len(Buf) < Len(SourceString) THEN
RETURN Buf
ELSE
RETURN ""
END IF
END
FUNCTION ExecutaComando(cSELECT AS String) AS Boolean
DIM iRetorno AS Boolean
DIM oConn AS Connection
DIM oResult AS Result
oConn = NEW Connection
oConn = OpenConnection()
oConn.Begin
oResult = oConn.Exec(cSELECT)
iRetorno = (oResult.Count >= 0)
oConn.Commit
RETURN iRetorno
END FUNCTION
...
strSql = "INSERT INTO EXTRATO (rgprp,logado,campo) VALUES ('2200','IAM','" & mString & "')"
if not ExecutaComando(strSql) then
message.erro("Erro........")
If im use any sql expression dont work
Example:
UPDATE EXTRATO SET campo = 'AV:9:0000001500:000000:AV:E:0000000001:07122004:0DN:BZh91AY&SYr6ì;AV:9:0000010000:000000:AV:E:0000000001:07122004:0DN:BZh91AY&SYzÛ¨' WHERE rgprp = '2600' AND LEFT(campo,2) = 'AV'
AV:9:0000001500:000000:AV:E:0000000001:07122004:0DN:BZh91AY&SYr6ì
----------\/---------------
returned string for zCripta function
More information about the User
mailing list