Trennzeichen geteilete Textdadei verküpfen
PeterDoering
Gesendet: 09.08.15 11:58
Betreff: RE: Trennzeichen geteilete Textdadei verküpfen



Extreme Veteran

Beiträge: 563
5002525
Hallo,

pwakolbi - 08.08.15 15:51
'DoCmd.TransferText acLinkDelim, "", "tmpProdukt", strAktVerz "Produkt.txt", False, ""

Wofür ich dankbar währe, wenn es eine mögliichkeit gibt die Spezifikation per VBA zu erledigen


Beispiel:

Private Function CreateIMEX()
Dim strSQL As String
Dim ID As Long

strSQL = "INSERT INTO MSysIMEXSpecs ( DateDelim, DateFourDigitYear, DateLeadingZeros, DateOrder, DecimalPoint, " & _
" FieldSeparator, FileType, SpecName, SpecType, StartRow, TextDelim, TimeDelim )" & _
" VALUES ( '.', -1, -1, 0, '.', '" & vbTab & "', 1252, 'MySpec', 1, 0, '', ':' )"

CurrentDbC.Execute strSQL , dbFailOnError

ID = DLookup("SpecID", "MSysIMEXSpecs", "SpecName='MySpec'")

strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 10, 'MyText1', 1, 0, " & ID & ", 7, 7 )"
CurrentDbC.Execute strSQL , dbFailOnError

strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 4, 'MyLong1', 0, 0, " & ID & ", 1, 3 )"
CurrentDbC.Execute strSQL , dbFailOnError

strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 8, 'MyDate1', 1, 0, " & ID & ", 25, 11 )"
CurrentDbC.Execute strSQL , dbFailOnError

End Function

Wenn du weitere Feldtypen brauchst, siehe http://www.access-im-unternehmen.de/732 und such nach dbBoolean.

-----
Gruss - Peter
Top of the page Bottom of the page