Quellcode-Bibliothek
© Kompilation durch diese Firma
[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]
Datei:
Ereignis-e.dat
Sprache: Unknown
Untersuchungsergebnis.~pas Download desLex {Lex[104] Fortran[118] CS[149]}zum Wurzelverzeichnis wechseln unit DBAccess;
interface
uses
SqlExpr, SqlConst, DBXpress, DB, Math, SysUtils,
Utilities, StrUtils;
function MySQLFeedback(SQ:TSQLConnection;
Vorname, Name, Email, Title,
Version, Itemindex,
Kommentar, IP :String):boolean;
procedure SQBeforeConnect(SQ:TSQLConnection;Passw:String;Crypt:String);
implementation
function MySQLFeedback(SQ:TSQLConnection;
Vorname, Name, Email, Title,
Version, Itemindex,
Kommentar, IP :String):boolean;
var
SQLstmt: Ansistring;
stmtParams: TParams;
CC:SQLResult;
Res:boolean;
begin
stmtParams := TParams.Create;
SQLstmt := 'insert into feedbacks.Feedback '
+ ' (Datum, Vorname, Name, Email, Produkt, '
+ ' Version, Bewertung, Kommentar, IP) '
+ ' values( CURRENT_TIMESTAMP '
+ ' ,"'+Vorname+'" '
+ ' ,"'+Name+'" '
+ ' ,"'+Email+'" '
+ ' ,"'+Title+'" '
+ ' ,"'+Version+'" '
+ ' ,'+ItemIndex+' '
+ ' ,"'+Kommentar+'" '
+ ' ,"'+IP+'");'
;
try
Res := False;
SQ.LoadParamsOnConnect := True;
SQ.LoginPrompt := True;
SQ.Connected := True;
CC:=SQ.Execute(SQLstmt,stmtparams,nil);
if CC = 0 then //OK
Res:=true
else if CC = 1 then // Warnung ?
Res:=true
else
Res:=false
finally
stmtParams.Free;
end;
MySQLFeedback:=Res
end;
procedure SQBeforeConnect(SQ:TSQLConnection;Passw:String;Crypt:String);
begin
// set SQL connection
with SQ do begin
Params.Values['BlobSize'] := '-1';
Params.Values['Database'] := 'feedbacks';
Params.Values['DriverName'] := 'MYSQL';
Params.Values['ErrorResourceFile'] := '';
Params.Values['HostName'] := 'mirator.ath.cx';
Params.Values['LocaleCode'] := '0000';
Params.Values['Password'] := Passw;
Params.Values['User_Name'] := MidStr(Crypt,9,2)
+MidStr(Crypt,15,3)
+MidStr(Crypt,13,1);
SQ.ParamsLoaded := true;
end
end;
end.
[ zur Elbe Produktseite wechseln0.108Quellennavigators
]
|
|