Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Textdatei mit VB einlesen !??

Empfohlene Antworten

Hallo !

Wie kann ich eine Textdatei unter VB einlesen und Sie in eine Access Datenbank abspeichern. Die Daten in der textdatei sind mit ; getrennt.

Kann mir jemand helfen ??

Schau mal die Funktion DoCmd.TransferSpreadsheat in der Hilfe nach. Das sollte dir eigentlich weiterhelfen.

is eigentlich ziemlich einfach...wenn du eine importspezifikation festgelegt hast.

Public Function importArItem() As Boolean

Dim pfad As String, dateiName As String

Dim master As String, tabellenName As String

Dim spezifikationsName As String, dateiNameLang As String

Dim dateiDatum As String, dateiTag As String

Dim dateiMonat As String, dateiJahr As String

Dim asofdate As String

Dim SysRCtlNext As Long

Dim SysRCtlCount As Long

Dim db1 As Database

Dim rs1 As Recordset

Dim sql As String

Dim i As Integer

Dim ariQdf As QueryDef, qdf As QueryDef

Dim queryName As String

importArItem = False

On Error GoTo importArItem_Error

spezifikationsName = "ARITEM_Importspezifikation"

pfad = getOptionValue("TransferPath")

If Right(pfad, 1) <> "\" Then

pfad = pfad & "\"

End If

' Hier kommt der CommonDialog!!

dateiName = FindFileDialog("Wählen Sie die zu importierende Datei aus!", pfad, "ARITEM (*aritem*.txt)", "*aritem*.txt")

If dateiName = "" Then

Exit Function

End If

For i = Len(dateiName) To 1 Step -1

If Mid$(dateiName, i, 1) = "\" Then Exit For

Next i

un so weiter...

Dann in die tabelle einfügen:

master = "ar_item_tmp"

sql = "INSERT INTO " & master & " ( SYS_RUN_CNTL_ID ) " _

& "SELECT " & tabellenName & ".*, " & SysRCtlNext & " AS SYS_RUN_CNTL_ID " _

& "FROM " & tabellenName & ";"

db1.Execute sql

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.