
Deleted records when text file is linked as table (#deleted)
I am trying to attach a text file to an existing access database using the
link method. I am finding all records with quotes (") in them show up as
deleted when the link is created. I would like to define the text qualifier
as {none}. I have search but find no examples of how to do this.
Below is the schema.ini file and a sample of the code with a record set
example.
Any help in resolving this would be appreciated. I have tried to escape
and double the quotes but nothing seems to stop the deleting.
Dan McGivney
Knapp Enterprises
Schema:
[update.txt]
colnameheader=true
format=delimited(|)
CharacterSet=ANSI
connect example
Public Sub Add_Table(Tname, FName)
' Check to see if table exist
For Each td In dbsJet.TableDefs
If td.Name = Tname Then
dbsJet.TableDefs.Delete Tname
End If
Next
' ad table
Set td = dbsJet.CreateTableDef _
(Tname)
td.Connect = _
"TEXT;DATABASE=C:\Inetpub\wwwroot\text_data"
td.SourceTableName = FName
dbsJet.TableDefs.Append td
End Sub
Record set
show_idTitle Show_Type Genre1 Year Actor Dur
GGLA06 Golfing the Great Lakes Sport Golf 30
#Deleted #Deleted #Deleted #Deleted #Deleted #Deleted
GHSI01 Gung Ho! Succeeding In A Changing World Special Business
90