Hello,How are you today?I have an Access application which uses linked tables on SQL Server 2K. I have the task of importing data from a .csv file to a database table. I currently accomplish this using the following:Public Function AppendFile2()Dim FileString As StringDim Fpath, Fname As StringDim tbl As TableDefDim tdfLinked As TableDefDim fnstart As IntegerDim dbs As DatabaseSet dbs = CurrentDb()FileString = FileOpen() If FileString = "" Then Exit Function End If fnstart = InStr(ReverseString(FileString), "\") Fpath = Left$(FileString, Len(FileString) - fnstart) Fname = Right$(FileString, fnstart - 1) On Error Resume Next dbs.TableDefs.Delete "Input Table Temp" On Error GoTo 0 Set tdfLinked = dbs.CreateTableDef("Input Table Temp") tdfLinked.Connect = "Text;DATABASE=" & Fpath tdfLinked.SourceTableName = Fname dbs.TableDefs.Append tdfLinked On Error GoTo 0 DoCmd.RunMacro "Append Input Table Macro1" Exit FunctionOnce the file is imported I then append the contents to an existing table: INSERT INTO [Input table] ( C_NUMBER, F_NUMBER ) SELECT [Input Table Temp].CARD, [Input Table Temp].F_NO FROM [Input Table Temp];
I am now converting my queries to passthrough ones to take advantage of the power of my database server, but since [Input Table Temp] is a temporary table in my Access database, my append query is not working. Is there another way way to acheive this import?