i have a form that edits contents in a database. everything is correct to my point of view but when i try to update a path of an image it gives me an error telling me
System.Data.OleDb.OleDbException was unhandled
Message="Incorrect syntax near 'C:'."
Source="Microsoft OLE DB Provider for SQL Server"
ErrorCode=-2147217900
the rest is the stack trace
i want to save a path which looks something like this:
C:\Users\Neville\Desktop\ThunderBolt Technologies Ltd\ThunderBolt Technologies Ltd\bin\Debug\Items\Item 11.jpg
when i debug the program it shows me that the \ becomes \\ for example C:\\Users\\ and so on(i dont know why) and then i tried using a foreach loop to get the whole imagePath put it in a charArray and when i hit \\ i use the .Replace function to turn it into / which is a readable string as \ or \\ are i think escape characters.
All in all if i could i would like to store the path using the ~ instead of the Application.StartUpPath which will save me many problems. any hints on this? thanks