Click to See Complete Forum and Search --> : help me


manish jaiswal
03-28-2003, 11:18 PM
i have a problem

i explain my problem with an example

i have a pulldown menu havig variosoptions.one of them is
-- fully confidential--
now when i select that option and insert it into database the value inserted
is only -fully-- and --confidential-- is not stored.

thus my problem is that whenever i try to store a multi-word option in the
database it only stores first word of selected option

can any one tell me

why this problem is occurring and how i tackle this problem

do send me a peice of code for the same

bye
manish

Phil Weber
03-29-2003, 01:05 AM
> my problem is that whenever I try to store a multi-word
> option in the database it only stores first word of selected
> option

Manish: What code are you using to retrieve the selected option and store it
in the database?
--
Phil Weber

manish jaiswal
03-30-2003, 11:42 PM
"Phil Weber" <philweber@hotmail.com> wrote:
> > my problem is that whenever I try to store a multi-word
> > option in the database it only stores first word of selected
> > option
>
>Manish: What code are you using to retrieve the selected option and store
it
>in the database?
>--
>Phil Weber
>
to retreive the record from database


<%
set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open "FILEDSN=ovc.dsn"
%>

<%
set loginrs = Server.CreateObject("ADODB.RecordSet")
dbquery = "SELECT type FROM biodata_type "
loginrs.Open dbquery,cnn
set un=loginrs("type")
%>


to store back the selected record which i store in a session variable session("bv")
in database

dbquery1 = "insert into user_login(cvtype)"
dbquery1 = dbquery1 & "values("
dbquery1 = dbquery1 & chr(39) & session("bv") & chr(39) & ")"

Q*bert
03-31-2003, 09:03 AM
My guess is that your option source looks like this
<option value=--Fully confidential--><--Fully confidential--</option>
When you do a request on this item, you will only get --fully... the parser
doesn't know how to handle the space. So, you need to wrap your value in
"'s like the below
<option value="--Fully confidential--"><--Fully confidential--</option>
That tells the parser that anything between the "'s is part of the value.

Just my thought.
If this isn't the problem post back, I'll take a closer look.
Cheers
Q*bert

"manish jaiswal" <m_jaiswal1@yahoo.com> wrote:
>
>i have a problem
>
>i explain my problem with an example
>
>i have a pulldown menu havig variosoptions.one of them is
> -- fully confidential--
>now when i select that option and insert it into database the value inserted
>is only -fully-- and --confidential-- is not stored.
>
>thus my problem is that whenever i try to store a multi-word option in the
>database it only stores first word of selected option
>
>can any one tell me
>
>why this problem is occurring and how i tackle this problem
>
>do send me a peice of code for the same
>
>bye
>manish
>