Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27379

[RESOLVED] Double a character?

$
0
0
I have a program that takes a user generated file path, and inserts that filepath into a MySQL table. However, since it's MySql I need to triple the \'s if they are using Windows. See below example:

Filepath is: C:\Program Files\WhateverFileHere

I need it to be written as: C:\\\Program Files\\\WhateverFileHere

How do I make VB automatically add the two extra \'s to the file name?

SO, if I put in C:\Program Files\WhateverFileHere as variable FilePath

I want to it convert that variable to C:\\\Program Files\\\WhateverFileHere

Hopefully all that makes sense.

Viewing all articles
Browse latest Browse all 27379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>