Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.net Using Linked .csv files as tables

Posted on 2013-12-05
2
Medium Priority
?
633 Views
Last Modified: 2013-12-05
Hi

I am using the following code to link .csv files into an Access database.
I need to convert these to Access tables. How would I do this?
The reason I used this approach would be to side step an import specification
Should I just be doing an import as a table

        Dim appAccess As New Microsoft.Office.Interop.Access.Application
        appAccess.OpenCurrentDatabase("C:\Users\murbro\Documents\Database1.accdb")
        appAccess.Visible = True

        'Link to a csv file so that it acts as a table in Access
        appAccess.DoCmd.TransferText(TransferType:=Microsoft.Office.Interop.Access.AcTextTransferType.acLinkDelim, TableName:="Orders", _
    FileName:="C:\Users\murbro\Documents\Orders.txt", HasFieldNames:=True)
0
Comment
Question by:Murray Brown
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39697829
I would simply directly import them.

However with a linked file, you can
- open Access
- Copy the linked table/file
- Paste it
- Select the option to make a local table when you paste it
0
 

Author Closing Comment

by:Murray Brown
ID: 39698492
thanks very much
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question