Friday 13 January 2012

Store File location on database


There are 2 methods to store file location on database .
      Use below codes just before saving to database.
       
      You can assign converted Textbox value to itself, or any other string variable.
   
       1.   Just replace \ in file location value with \\

txtLocation.Text = Replace(txtLocation.Text, "\", "\\")


       Note:- While retrieving data from Database, you did not need to convert \\ to \ 

       2.     Just replace \ in file location value with *(star symbol)

   txtLocation.Text = Replace(txtLocation.Text, "\", "*")

Note:- While retrieving data from Database, you should convert * to \ before showing in Label or Textbox.

   txtLocation.Text = Replace(txtLocation.Text, "*", "\")

No comments:

Post a Comment