problem with DataBase Path While uploading Images
-
Hi iam in windows application using c#. my database is "FireBird Database". Database path is : string dsRelativePath = "database\\absolutemedia.fdb"; string dsAbsolutePath = Path.GetFullPath(dsRelativePath); string ConnectionString = "ServerType=1;User=SYSDBA;Password=masterkey;Database=" +dsAbsolutePath; This path is working fine upto now.. but in my application, i have an option to upload images from local drives..iam browisng an image thru "OpenFileDialog".. after selecting an image .when iam going to save , database path i,e dsAbsolutePath is changed to image path.it's giving error in database connection... please reply where the problem is ? how can i rectify this .
murali krishna
-
Hi iam in windows application using c#. my database is "FireBird Database". Database path is : string dsRelativePath = "database\\absolutemedia.fdb"; string dsAbsolutePath = Path.GetFullPath(dsRelativePath); string ConnectionString = "ServerType=1;User=SYSDBA;Password=masterkey;Database=" +dsAbsolutePath; This path is working fine upto now.. but in my application, i have an option to upload images from local drives..iam browisng an image thru "OpenFileDialog".. after selecting an image .when iam going to save , database path i,e dsAbsolutePath is changed to image path.it's giving error in database connection... please reply where the problem is ? how can i rectify this .
murali krishna
I think u are setting the image path in dsRelativePath after the image is selected...check that ...if so store the path in different variable
.....
-
I think u are setting the image path in dsRelativePath after the image is selected...check that ...if so store the path in different variable
.....
Hi, Thanks for Reply.. Here iam not setting ImagePath to "dsAbsolutePath"; iam taking Imagepath to another string.
murali krishna
-
Hi, Thanks for Reply.. Here iam not setting ImagePath to "dsAbsolutePath"; iam taking Imagepath to another string.
murali krishna
i don't understand how come image path value is taken in dsAbsolutePath without setting it ...declare the dsAbsolutePath and dsRelativePath variables as constants and see if the error still occurs..can u post your code ?
.....