VBA

Get Table Data in RecordSet

If you study VBA after studying C# or VB.net, don’t you think like this?

“Is dataTable not in VBA? “

In fact, we can’t use dataTable  in VBA.

You can use the RecordSet instead of the DataTable to do the same thing.

I leave it as a memorandum of usage

Code to Get Table into RecordSet

The outline of the process is as follows.

①SELECT data from table
②Get result to RecordSet
③Output to csv, tsv

I created an access file.

You can download from here.

How to Output csv,tsv From RecordSetI tried to output a tsv file from an Access table, but surprisingly ...

How to Write Table to RecordSet

It is written like the following.

Note: The SELECT result is stored in RecordSet on line 13.

Contents of GetSupplier()

The SELECT statement is created by GetSupplier().

StringBuilder is described below.

StringBuilder Class

StringBuilder is also an existing class in C # and VB.net, but not in VBA.

So I created easily.

Once created, it is useful because it is used in other Access apps.

COMMENT

Your email address will not be published. Required fields are marked *