954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Storing UNC paths in mysql through vb.net

Hey guys.

I know this is more of an sql problem but I didnt know where else to put it :S

I have an application which stores a UNC path in a mysql database table. However it doest store it correctly for example:

I want to store the UNC Path: \\testmachine\test\

when i look at the table in the database i have the following

\testmachinetest :s

Can anyone explain why this happens? I have the column for the unc path as a VARCHAR(100) is this wrong?

Please help :)

mstester
Newbie Poster
17 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

show us your code...

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

Sorry for the late reply, Ive had no Internet for the past week :S

Well I figured out why I couldnt store UNC paths in the base, In mySql "\\" is reserverd as a something else.

If you want to store a UNC path such as "\\test\test\" you need to enter this into your db

"set sql_mode='NO_BACKSLASH_ESCAPES';"

Hope this helps other ppl :D

mstester
Newbie Poster
17 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You