Dim oConnVFP As New Data.OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("VFPLibrary").ConnectionString) Dim cPath As String = Server.MapPath("App_Data") Dim oStreamWriter As StreamWriter 'Open the file. oStreamWriter = New StreamWriter(cPath + "\Temp.txt", False, Encoding.ASCII) 'Use true for append mode oStreamWriter.Write("keyID,envID,Shelflist,category0,category1,category2,Title,Author,Description,Region,Pubdate,Pages,Subjects,Electronic,OnLoanTo,DateAdded,AddedBy" + vbCrLf) Dim SQL As String = "SELECT * FROM library3 ORDER BY title " Using oConnVFP Dim command As New Data.OleDb.OleDbCommand(SQL) command.Connection = oConnVFP oConnVFP.Open() Dim oReader As Data.OleDb.OleDbDataReader = command.ExecuteReader() oReader.Read() ' Call Read before accessing data. Dim endquote As String = """" Dim midquote As String = """" + "," + """" While (oReader.Read()) oStreamWriter.Write(endquote + oReader("keyID").ToString.Trim) oStreamWriter.Write(midquote + oReader("envID").ToString.Trim) oStreamWriter.Write(midquote + oReader("Shelflist").ToString.Trim) oStreamWriter.Write(midquote + oReader("category0").ToString.Trim) oStreamWriter.Write(midquote + oReader("category1").ToString.Trim) oStreamWriter.Write(midquote + oReader("category2").ToString.Trim) oStreamWriter.Write(midquote + oReader("title").ToString.Trim) oStreamWriter.Write(midquote + oReader("author").ToString.Trim) oStreamWriter.Write(midquote + oReader("description").ToString.Trim) oStreamWriter.Write(midquote + oReader("region").ToString.Trim) oStreamWriter.Write(midquote + oReader("pubdate").ToString.Trim) oStreamWriter.Write(midquote + oReader("pages").ToString.Trim) oStreamWriter.Write(midquote + oReader("subjects").ToString.Trim) oStreamWriter.Write(midquote + oReader("electronic").ToString.Trim) oStreamWriter.Write(midquote + oReader("onloanto").ToString.Trim) oStreamWriter.Write(midquote + oReader("dateadded").ToString.Trim) oStreamWriter.Write(midquote + oReader("addedby").ToString.Trim) oStreamWriter.Write(endquote + vbCrLf) End While oReader.Close() ' Call Close when done reading. oConnVFP.Close() End Using 'Close the file. oStreamWriter.Close() Dim oConnAccess As New System.Data.OleDb.OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings("AccessConnection").ToString) Dim Path As String = Server.MapPath("App_Data") oConnAccess.Open() Dim strSQL As String = "" strSQL = "DELETE FROM PAGLibrary" Dim objCommand As New System.Data.OleDb.OleDbCommand(strSQL, oConnAccess) objCommand.ExecuteNonQuery() strSQL = "INSERT INTO PAGLibrary (keyID,envID,Shelflist,category0,category1,category2,Title,Author,Description,Region,Pubdate,Pages,Subjects,Electronic,OnLoanTo,DateAdded,AddedBy)" & _ " SELECT keyID,envID,Shelflist,category0,category1,category2,Title,Author,Description,Region,Pubdate,Pages,Subjects,Electronic,OnLoanTo,DateAdded,AddedBy FROM [Text;DATABASE=" & Path & ";].[temp.txt]" objCommand = New System.Data.OleDb.OleDbCommand(strSQL, oConnAccess) objCommand.ExecuteNonQuery() oConnAccess.Close()>I had a recollection we discussed this before Re: Problem with VFPOLEDB driver Thread #1236245