Problem mit einem SQL String

robb

Mitglied
Nabend,

also seit ca einer 3/4 Stunde sitze ich jetzt an diesem String:
Code:
 Dim sSql As String
        sSql = "INSERT INTO tbl_coming ( band, " & _
        "album, " & _
        "bild, " & _
        "bemerkungen, " & _
        "autor, " & _
        "label, " & _
        "labellink, " & _
        "bandwebsite, " & _
        "datum) VALUES ('" & txt_band.Text & "'" & ", " & _
        "'" & txt_album.Text & "'" & ", " & _
        "'" & txt_bild.Text & "'" & ", " & _
        "'" & txt_bemerkungen.Text & "'" & ", " & _
        "'" & txt_autor.Text & "'" & ", " & _
        "'" & txt_label.Text & "'" & ", " & _
        "'" & txt_labelwebsite.Text & "'" & ", " & _
        "'" & txt_bandwebsite.Text & "'" & ", " & _
        "'" & txt_releasedate.Text & "'" & ")"

Ich bekomme es einfach nicht hin. Mir wird immer gesagt, dass es einen Syntax Fehler in der Anweisung gibt. Aber wo?
Vielleicht kann mir ja jemand helfen...

Grüße
 
Hallo

Band ist z.B. ein intern verwendeter Name, weiß aber nicht was damit machen kann.
Versuch´s mal so:
Code:
Dim sSql As String

        sSql = "INSERT INTO [tbl_coming] " & _
        "([band], " & _
        "[album], " & _
        "[bild], " & _
        "[bemerkungen], " & _
        "[autor], " & _
        "[label], " & _
        "[labellink], " & _
        "[bandwebsite], " & _
        "[datum]) " & _
        "VALUES ('" & txt_band.Text & "', " & _
        "'" & txt_album.Text & "', " & _
        "'" & txt_bild.Text & "', " & _
        "'" & txt_bemerkungen.Text & "', " & _
        "'" & txt_autor.Text & "', " & _
        "'" & txt_label.Text & "', " & _
        "'" & txt_labelwebsite.Text & "', " & _
        "'" & txt_bandwebsite.Text & "', " & _
        "'" & txt_releasedate.Text & "')"
 
Zurück