Jump to content

Recommended Posts

Posted

Hello all. I am trying to do a filewrite statement that will concatenate multiple string values together so that I can paste the results into a query. The actually text pieces for the query are from a variable thats fed by a loop. The database program that I am using requires that each value be placed in double-quotes. Since the double-quotes also define when a text string starts and stops I get errors when I do the following piece of code:

FileWrite ("c:\SMS_in_qry.txt", """ & $rdline & "",")

The desired result is a list like this: machine1, machine2,..

What I currently do is this:

FileWrite ("c:\SMS_in_qry.txt", "#" & $rdline & "#,")

I then replace #s with . I was wondering if there was a special character or method for enclosing a double quote by itself within double-quotes to get this desired effect. Thanks!

Posted

Just use single quotes to wrap the double quotes that you want to keep.

FileWrite ("c:\SMS_in_qry.txt", '"' & $rdline & '",')
Worked like a charm. Thank you very much!
Posted

$a="cippolippo was here"

;$a="" & $a & ""

$a=""&chr(34) & $a & chr(34) & ""

MsgBox(262144, "", $a)

;$a=""& $a &""

  • 13 years later...
Posted

OMG! this fixes my problems due to syntax error thingy many thanks guys hahahah I'm a newbie here just wanting to generate some ini files and I've learned that it's not possible to put " directly hahaha 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...