CREATE txt with ";"

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

CREATE txt with ";"

Post by sal21 »

Code: Select all

...
STRINGA = ""
rsObject.Open strSQL, adoCon
    Do While Not rsObject.EOF
        For I = 0 To rsObject.Fields.Count - 1
            STRINGA = STRINGA & """;""" & Trim(rsObject(I))
        Next I
        Print #F2, STRINGA
        STRINGA = ""
        rsObject.MoveNext
    Loop
...
part of code...

during the creation of txt i see:

";"uuuuuuu":"........":"rrrrrrrrrr":"

i need

"uuuuuuu":"........":"rrrrrrrrrr"

perphs this resolve;

Do While Not rsObject.EOF
Print #F2, rsObject.GetString(, 1000, ";", vbCrLf, "");
rsObject.MoveNext
Loop

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CREATE txt with ";"

Post by HansV »

Print #F2, Mid(STRINGA, 4)
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

Re: CREATE txt with ";"

Post by sal21 »

HansV wrote:Print #F2, Mid(STRINGA, 4)
wow!!!!!!!!

but have see my getstring solution?

note:
Changed my original post

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CREATE txt with ";"

Post by HansV »

You changed your post while I composed my previous reply...
Have you tried GetString? Does it do what you want?
Best wishes,
Hans