|
| 1 | +--- |
| 2 | +title: DumpToAccessTable |
| 3 | +parent: Methods |
| 4 | +grand_parent: API |
| 5 | +nav_order: 3 |
| 6 | +--- |
| 7 | + |
| 8 | +# DumpToAccessTable |
| 9 | +{: .d-inline-block } |
| 10 | + |
| 11 | +New |
| 12 | +{: .label .label-purple } |
| 13 | + |
| 14 | +Dumps the data from the current instance to a Microsoft Access Database (.accdb). |
| 15 | +{: .fs-6 .fw-300 } |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +>⚠️**Caution** |
| 20 | +>{: .text-grey-lt-000 .bg-green-000 } |
| 21 | +>This method is only available in the [Access version of the CSVinterface.cls](https://github.com/ws-garcia/VBA-CSV-interface/blob/master/src/Access_version.zip) module. |
| 22 | +{: .text-grey-dk-300 .bg-yellow-000 } |
| 23 | + |
| 24 | +## Syntax |
| 25 | + |
| 26 | +*expression*.`DumpToAccessTable`*(dBase, tableName, \[fieldsToIndexing\])* |
| 27 | + |
| 28 | +### Parameters |
| 29 | + |
| 30 | +<table> |
| 31 | +<thead> |
| 32 | +<tr> |
| 33 | +<th style="text-align: left;">Part</th> |
| 34 | +<th style="text-align: left;">Description</th> |
| 35 | +</tr> |
| 36 | +</thead> |
| 37 | +<tbody> |
| 38 | +<tr> |
| 39 | +<td style="text-align: left;"><em>dBase</em></td> |
| 40 | +<td style="text-align: left;">Required. Identifier specifying a <code>DAO.Database</code> object variable representing the output database.</td> |
| 41 | +</tr> |
| 42 | +<tr> |
| 43 | +<td style="text-align: left;"><em>tableName</em></td> |
| 44 | +<td style="text-align: left;">Required. Identifier specifying a <code>String</code> Type variable representing the output database table name.</td> |
| 45 | +</tr> |
| 46 | +<tr> |
| 47 | +<td style="text-align: left;"><em>fieldsToIndexing</em></td> |
| 48 | +<td style="text-align: left;">Optional. Identifiers specifying a <code>Variant</code> Type variables representing the fields of the table in where indexing is required.</td> |
| 49 | +</tr> |
| 50 | +</tbody> |
| 51 | +</table> |
| 52 | + |
| 53 | +### Returns value |
| 54 | + |
| 55 | +_None_ |
| 56 | + |
| 57 | +>📝**Note** |
| 58 | +>{: .text-grey-lt-000 .bg-green-000 } |
| 59 | +>Before dump data, is required to make a call to the `ImportFromCSV` or `ImportFromCSVstring` method. |
| 60 | +{: .text-grey-dk-300 .bg-grey-lt-000 } |
| 61 | + |
| 62 | +See also |
| 63 | +: [ImportFromCSV method](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/importfromcsv.html), [ImportFromCSVstring method](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/importfromcsvstring.html). |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Behavior |
| 68 | + |
| 69 | +If a table named *tableName* already exist in the database, the operation is aborted. User can specify the fields for create indexes by name or by absolute position through the *fieldsToIndexing* parameter. When the *fieldsToIndexing* parameter is not set, the data is dumped into the database table without indexing more fields than the record position. |
| 70 | + |
| 71 | +[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/) |
0 commit comments