Home > Software engineering >  VB ADO. You save results in the CSV
VB ADO. You save results in the CSV

Time:09-18

I want to keep one of the tables into MSSQL CSV to local,
Is the result of the as long as you keep inside, the inside of the structure does not need to keep

I use rs. Save "c: \ a.c sv," adPersistADTG to Save time, found inside the file is stil
In XML format to save, and found the table structure is also preserved the

I want to achieve only to save the inside of the result, don't want to write a loop to traverse

Do not know to have what good method?

CodePudding user response:

CSV file is not common standards, there are many format variant,

You can use a text file external database access method, extension is defined as the CSV,

CodePudding user response:

Get string method (ADO you)


Will you return as a character string,

Syntax

Set the Variant=you. Get string (StringFormat NumRows, ColumnDelimiter, RowDelimiter, NullExpr)

The return value

Will you to value for the variable size of the string (BSTR) returns,

Parameter

StringFormat you specified shall be converted into the following format,

Constants that
AdClipString row by RowDelimiter boundary, column by ColumnDelimiter boundary, NULL values by NullExpr boundary, the three parameters is only effective when used with adClipString,


NumRows optional, record set to convert the number of rows, if you don't specify NumRows, or it is greater than the total number of records set, record set all the rows to conversion,

ColumnDelimiter optional, if specified as a delimiter between columns, otherwise for TAB characters,

RowDelimiter optional, if specified as a delimiter between lines, or for the CARRIAGE RETURN character,

NullExpr optional, if you specify is instead of the NULL value expressions, or to an empty string,

Description

Saved to a string of data in the rows of data rather than an outline data, so you can't use the string to open the recordset,

This method is equivalent to the RDO GetClipString method,
  • Related