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.

https://overseas.loosecarrot.com/2019/03/25/85

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.

あわせて読みたい

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です