Is it possible to Change String Delimiter without using an interface Spec?



Hi All,

I have build the following simple function to import data into a table but
the data has a ' as the string delimiter. Is there any way I can specify
the string delimiter without using an interface spec?

I want to be able to distribute just the code on its own to keep it as
simple as possible for the users.

Thanks

Andi

Function fncBatchImport(strSRCpath As String, strTableName As String) As
Boolean
Dim strSRCdir As String, strSRCfile As String
'Reference the library Microsoft ActiveX Data Objects 2.1 (or higher).
On Local Error GoTo ImportError
'DoCmd.Hourglass True

DoCmd.TransferText acImportDelim, , strTableName, strSRCpath, True
ImportEnd:
'DoCmd.Hourglass False
fncBatchImport = tableExists(strTableName)
Exit Function

ImportError:
MsgBox Err.Description
' DoCmd.Hourglass False
End Function


.



Relevant Pages

  • Re: Is it possible to Change String Delimiter without using an interface Spec?
    ... > If you want to use TransferText the only way to specify a non-standard ... >> the data has a ' as the string delimiter. ... >> Dim strSRCdir As String, ... >> On Local Error GoTo ImportError ...
    (microsoft.public.access.externaldata)
  • Re: UDF to convert number
    ... >>within the sproc each record will be returned as a string of characters ... My goal is to have one file writer and have the individual SPROC's ... > treated as a string delimiter by some clients. ...
    (microsoft.public.sqlserver.programming)
  • Re: Split function or Join function: delimiter problem
    ... Typing the string is not an option so I cannot control the delimiters. ... > If so, the answer is No, there is no such "substitute" string delimiter. ... a string literal can be coded that contains a quotation mark simplu by typing two quotation marks for each one that you want to appear in the string. ... If your newsreader displays the HTML, you'll see that, otherwise you won't. ...
    (microsoft.public.vb.general.discussion)
  • Re: textbox text property
    ... You can use the Split function instead of the split method on the string ... object which accepts a string delimiter and the code is a little simpler: ... Dim astr() As String = Split ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to go from string abc to string a|b|c
    ... public static string DelimitString(string value, string delimiter) ... foreach (char pchrChar in value) ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast