banford Posted April 25, 2006 Share Posted April 25, 2006 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! Link to comment Share on other sites More sharing options...
MHz Posted April 25, 2006 Share Posted April 25, 2006 Just use single quotes to wrap the double quotes that you want to keep. FileWrite ("c:\SMS_in_qry.txt", '"' & $rdline & '",') AutoPM 1 Link to comment Share on other sites More sharing options...
banford Posted April 25, 2006 Author Share Posted April 25, 2006 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! Link to comment Share on other sites More sharing options...
Lapo Posted April 26, 2006 Share Posted April 26, 2006 $a="cippolippo was here" ;$a="" & $a & "" $a=""&chr(34) & $a & chr(34) & "" MsgBox(262144, "", $a) ;$a=""& $a &"" Link to comment Share on other sites More sharing options...
PsYcHoPaTz Posted January 26, 2020 Share Posted January 26, 2020 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now