Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am storing logo (Bitmap) path into database. By using File upload when I browse the Logo(bitmap) and select logo it's whole path is selected. can we use ~ sign by which just name of bitmap have to store and ~ sign get remain path automatically in vc++ 6.0
Posted

1 solution

Yes you could, but you need to provide the code to do the lookup of the default path when it enocunters the '~' sign.
 
Share this answer
 
Comments
Kishor-KW 18-Jan-16 6:10am    
may you mention what that code is ?
Richard MacCutchan 18-Jan-16 6:49am    
You just need to replace the '~' sign with the root path. Create a buffer containing the root path and append the text following the '~'. Not exactly a complicated bit of programming.
Kishor-KW 19-Jan-16 0:46am    
ok, you means

D:\set\get\logo.bmp this is my path of logo.

So what should I save into the database
D:\logo.bmp or just logo.bmp ?
Richard MacCutchan 19-Jan-16 3:07am    
You save just the part of the path that is unique to that file. I do not know what you expect the '~' character to represent, but in UNIX it is the user's home directory.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900