Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: reSounds.~dfm   Sprache: Unknown

Spracherkennung für: .~pas vermutete Sprache: Lex {Lex[104] Fortran[118] CS[149]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

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.

 

[ Dauer der Verarbeitung: 0.102 Sekunden  ]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik