473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

backslash

Hi

I created a table with varchar field where i want to store
the path of an image.

I will then use this file to retrieve this image on my
browser. Everything goes fine when i use a simple html
command as :
<img src="C:\Inetpub\wwwroot\MyWeb\images\one.jpg"
height="200" width="200">

this is a hard-coded path. Hence no problem.

But when I store in the database path value:

insert into story_table values
(1, 'Language', 'C:\Inetpub\wwwroot\MyWeb\images\one.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\two.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\three.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\four.jpg', 'variation','cu
lture',
'tamil','chinese','english','german','hindi','maly alam','si
nglish','urdu');

'\' is not stored????????? why is this so ? hwo can i
store the complete using backslah. Currently it is storign
as:
C:InetpubwwwrootMyWebimagesone.jpg
instead of:
C:\Inetpub\wwwroot\MyWeb\images\one.jpg

any idea why is this happening?

thanks
janet!
Jul 19 '05 #1
1 2129
Hi Janet

Try replacing the backslash character with its unicode equivalent which is
UNICODE(5C). I think the datatype of your field might need to be nvarchar to
use unicode. I have never done that myself so I don't know if it works...

Alternatively, if all of your images are stored in the same folder could you
not just store the image name and perhaps use relative url in your code?

Hope this helps
Graham

"janet" <kn*******@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi

I created a table with varchar field where i want to store
the path of an image.

I will then use this file to retrieve this image on my
browser. Everything goes fine when i use a simple html
command as :
<img src="C:\Inetpub\wwwroot\MyWeb\images\one.jpg"
height="200" width="200">

this is a hard-coded path. Hence no problem.

But when I store in the database path value:

insert into story_table values
(1, 'Language', 'C:\Inetpub\wwwroot\MyWeb\images\one.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\two.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\three.jpg',
'C:\Inetpub\wwwroot\MyWeb\images\four.jpg', 'variation','cu
lture',
'tamil','chinese','english','german','hindi','maly alam','si
nglish','urdu');

'\' is not stored????????? why is this so ? hwo can i
store the complete using backslah. Currently it is storign
as:
C:InetpubwwwrootMyWebimagesone.jpg
instead of:
C:\Inetpub\wwwroot\MyWeb\images\one.jpg

any idea why is this happening?

thanks
janet!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Aloysio Figueiredo | last post by:
I need to replace every ocurrence of '/' in s by '\/' in order to create a file named s. My first attempt was: s = '\/'.join(s.split('/')) but it doesn't work: >>> s = 'a/b' >>> s =...
3
by: Terry Asher | last post by:
The following script does NOT escape the Apostrophe. Meaning when you mouseover the image the Alt tag says this: DMACC, It and then it stops. <SCRIPT Language="JavaScript"> var pos = "DMACC,...
3
by: Sathyaish | last post by:
In trying to replace character literals for their char constant, I am having difficulty printing the char constant for backslash. It instead prints the char literal. How do I resovle this? ...
6
by: John Salerno | last post by:
I have this: subdomain = raw_input('Enter subdomain name: ') path = r'C:\Documents and Settings\John Salerno\My Documents\My Webs\1and1\johnjsalerno.com\' + subdomain Obviously the single...
2
by: John Dann | last post by:
I guess there must be some convention or Windows specification for whether the backslash immediately preceding the file name in a full path string to a file is formally part of the path string or...
3
by: Stef Mientki | last post by:
It looks like sometimes a single backslash is replaced by a double backslash, but sometimes it's not ??? See the error message below, the first backslash is somewhere (not explicitly in my code)...
2
by: Tobiah | last post by:
>>"'" "'" "'" "\\'" "\\'" This is quite different than any other language that I am used to. Normally, a double backslash takes away the special meaning of the last backslash, and so you...
5
by: vlsidesign | last post by:
The printf function returns "warning: unknown escape sequence: \040" for a backslash-space combination. If the ascii decimal number for space is 32 and the backslash is 92, why this particular...
4
by: Razzbar | last post by:
I'm working on a bookmarklet that grabs information from a page and submits it to a server. Yet another social bookmarking application. I'm having trouble with page titles that include an...
4
nithinpes
by: nithinpes | last post by:
I will boil down my exact requirement to this: I should print out lines that do not contain semi-colon, backslash and closing parentheses. The following one -liner works fine. perl -ne "unless(//)...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.