Einzelnen Beitrag anzeigen

Lemmy

Registriert seit: 8. Jun 2002
Ort: Berglen
2.366 Beiträge
 
Delphi 10.3 Rio
 
#4

AW: In SQLite Integer-Wert schreiben?

  Alt 30. Nov 2013, 21:10
nicht extra quoten:


Delphi-Quellcode:
    sSQL := 'INSERT INTO allStations(aName, aStreamURL, aWebsiteURL, aScheduleURL, aFavorite, aFixed, aInfo, ';
    sSQL := sSQL + 'fk_language_id, fk_category_id) VALUES ("' + Trim(StationNameLEdit.Text) + '",';
    sSQL := sSQL + '"' + Trim(StreamURLLEdit.Text) + '",';
    sSQL := sSQL + '"' + Trim(StationWebsiteLEdit.Text) + '",';
    sSQL := sSQL + '"' + Trim(StationProgramsLEdit.Text) + '",';
    sSQL := sSQL + '"' + IntToStr(f) + '",';
    sSQL := sSQL + '"' + IntToStr(0) + '",';
    sSQL := sSQL + '"' + InfoMemo.Text + '",';
    sSQL := sSQL + IntToStr(Integer(LanguageComboBox.Items.Objects[LanguageComboBox.ItemIndex])) + ',';
    sSQL := sSQL + IntToStr(Integer(CategoryComboBox.Items.Objects[CategoryComboBox.ItemIndex])) + ');';
Texte müssen in den entsprechenden Quote-Zeichen " oder ' eingefasst werden. Zahlen eben nicht.

Grüße
  Mit Zitat antworten Zitat