Visual Basic-Quellcode
- Public Function WriteDBF()
- On Error GoTo ErrEnd
- If Format(Now, "DD.MM.YYYY") <> GetINISetting("DBF", "SaveDate", "") Then
- UnloadDBF
- LoadDBF
- End If
- dbc.Execute "INSERT INTO " & Format(GetINISetting("DBF", "SaveDate", ""), GetINISetting("General", "DBFFormat", "DDMMYY")) & GetINISetting("General", "DBFExtension", "LS") & " " & GetINISetting("DBF", "SQLHeader", "") & _
- "VALUES ('" & _
- GetINISetting("Record", "RecNo", "0") & "','" & _
- Datei.Typ & "','" & _
- Format(Now, "DD.MM.YYYY") & "','" & _
- Format(Now, "HH:NN:SS") & "','" & _
- Replace(fHandle.Data(1).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- IIf(fHandle.Data(7).Caption = GetINISetting("General", "TrueRead", ""), "n.i.O.", "i.O.") & "','" & _
- Replace(fHandle.Data(2).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- IIf(fHandle.Data(8).Caption = GetINISetting("General", "TrueRead", ""), "n.i.O.", "i.O.") & "','" & _
- Replace(fHandle.Data(3).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- IIf(fHandle.Data(9).Caption = GetINISetting("General", "TrueRead", ""), "n.i.O.", "i.O.") & "','" & _
- Replace(fHandle.Data(4).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- IIf(fHandle.Data(10).Caption = GetINISetting("General", "TrueRead", ""), "n.i.O.", "i.O.") & "','" & _
- IIf(fHandle.Data(6).Caption = GetINISetting("General", "TrueRead", ""), "i.O.", "n.i.O.") & "','" & _
- Replace(fHandle.Data(20).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- Replace(fHandle.Data(21).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- Replace(fHandle.Data(22).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- Replace(fHandle.Data(23).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- Replace(fHandle.Data(24).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- Replace(fHandle.Data(25).Caption, ",", ".", 1, -1, vbTextCompare) & "','" & _
- IIf(fHandle.Data(27).Caption = GetINISetting("General", "TrueRead", ""), "i.O.", "n.i.O.") & "','" & _
- fHandle.Data(49).Caption & "')"
- Exit Function
- ErrEnd:
- MsgBox "Die Funktion 'WriteDBF()' konnte nicht ausgeführt werden!" & vbCrLf & vbCrLf & _
- "Fehler: " & Err.Description & " (" & Err.Number & ")", vbCritical, "Fehler in Funktion WriteDBF"
- End Function
kann mir bitte jemand sagen was hier nicht korrekt ist
vielen dank im vorraus