Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: passing variables through querystring link


Message #1 by "Lori Bannon" <lori@s...> on Thu, 20 Mar 2003 17:31:16
Hi guys,

I'm trying to pass a number type variable through a querystring link and 
I'm getting a type mismatch error:

<a href="statusForm.asp?ID=<%pCompanyID%>" class="color">

If I include Server.URLEncode:

<a href="statusForm.asp?ID=<%Server.URLEncode(pCompanyID)%>" class="color">

It works but it doesn't pass the variable:

path at the bottom of the browser: statusForm.asp?ID

I know that the data is there for pCompanyID because I did a 
response.write pCompanyID
response.end

right after pCompanyID = oRs("companyID")

help??

Lori
Message #2 by "Ian: Future Proof Web Dev" <lists@f...> on Thu, 20 Mar 2003 17:50:31 -0000
Hi Lori,
I think you have missed out the '=' which is a shortcut for Response.Write.
Your link should look like:
<a href="statusForm.asp?ID=<%=pCompanyID%>" class="color">
this assumes that pCompanyID is a valid variable.
hth
ian

-----Original Message-----
From: Lori Bannon [mailto:lori@s...]
Sent: 20 March 2003 17:31
To: Access ASP
Subject: [access_asp] passing variables through querystring link


Hi guys,

I'm trying to pass a number type variable through a querystring link and 
I'm getting a type mismatch error:

<a href="statusForm.asp?ID=<%pCompanyID%>" class="color">

If I include Server.URLEncode:

<a href="statusForm.asp?ID=<%Server.URLEncode(pCompanyID)%>" class="color">

It works but it doesn't pass the variable:

path at the bottom of the browser: statusForm.asp?ID

I know that the data is there for pCompanyID because I did a 
response.write pCompanyID
response.end

right after pCompanyID = oRs("companyID")

help??

Lori


Message #3 by "Lori Bannon" <lori@s...> on Thu, 20 Mar 2003 19:22:30
> Hi Lori,
I think you have missed out the '=' which is a shortcut for Response.Write.
Your link should look like:
<a href="statusForm.asp?ID=<%=pCompanyID%>" class="color">
this assumes that pCompanyID is a valid variable.
hth
ian

-----Original Message-----
From: Lori Bannon [mailto:lori@s...]
Sent: 20 March 2003 17:31
To: Access ASP
Subject: [access_asp] passing variables through querystring link


Hi guys,

I'm trying to pass a number type variable through a querystring link and 
I'm getting a type mismatch error:

<a href="statusForm.asp?ID=<%pCompanyID%>" class="color">

If I include Server.URLEncode:

<a href="statusForm.asp?ID=<%Server.URLEncode(pCompanyID)%>" class="color">

It works but it doesn't pass the variable:

path at the bottom of the browser: statusForm.asp?ID

I know that the data is there for pCompanyID because I did a 
response.write pCompanyID
response.end

right after pCompanyID = oRs("companyID")

help??

Lori


Message #4 by "Lori Bannon" <lori@s...> on Thu, 20 Mar 2003 19:24:14
Thanks ian...that was it (its always the little things that i miss :(. 
What do you mean by a valid variable. I am self taught and I'm sure there 
are plenty of things that I am missing.

thanks again
Lori



> Hi Lori,
I think you have missed out the '=' which is a shortcut for Response.Write.
Your link should look like:
<a href="statusForm.asp?ID=<%=pCompanyID%>" class="color">
this assumes that pCompanyID is a valid variable.
hth
ian

-----Original Message-----
From: Lori Bannon [mailto:lori@s...]
Sent: 20 March 2003 17:31
To: Access ASP
Subject: [access_asp] passing variables through querystring link


Hi guys,

I'm trying to pass a number type variable through a querystring link and 
I'm getting a type mismatch error:

<a href="statusForm.asp?ID=<%pCompanyID%>" class="color">

If I include Server.URLEncode:

<a href="statusForm.asp?ID=<%Server.URLEncode(pCompanyID)%>" class="color">

It works but it doesn't pass the variable:

path at the bottom of the browser: statusForm.asp?ID

I know that the data is there for pCompanyID because I did a 
response.write pCompanyID
response.end

right after pCompanyID = oRs("companyID")

help??

Lori


Message #5 by "Ian: Future Proof Web Dev" <lists@f...> on Thu, 20 Mar 2003 20:49:55 -0000
Hi Lori,
glad to help, I meant that you had done something like: pCompanyID 
oRs("companyID") to get a value for pCompanyID.

cheers
ian


-----Original Message-----
From: Lori Bannon [mailto:lori@s...]
Sent: 20 March 2003 19:24
To: Access ASP
Subject: [access_asp] RE: passing variables through querystring link


Thanks ian...that was it (its always the little things that i miss :(.
What do you mean by a valid variable. I am self taught and I'm sure there
are plenty of things that I am missing.

thanks again
Lori



> Hi Lori,
I think you have missed out the '=' which is a shortcut for Response.Write.
Your link should look like:
<a href="statusForm.asp?ID=<%=pCompanyID%>" class="color">
this assumes that pCompanyID is a valid variable.
hth
ian

-----Original Message-----
From: Lori Bannon [mailto:lori@s...]
Sent: 20 March 2003 17:31
To: Access ASP
Subject: [access_asp] passing variables through querystring link


Hi guys,

I'm trying to pass a number type variable through a querystring link and
I'm getting a type mismatch error:

<a href="statusForm.asp?ID=<%pCompanyID%>" class="color">

If I include Server.URLEncode:

<a href="statusForm.asp?ID=<%Server.URLEncode(pCompanyID)%>" class="color">

It works but it doesn't pass the variable:

path at the bottom of the browser: statusForm.asp?ID

I know that the data is there for pCompanyID because I did a
response.write pCompanyID
response.end

right after pCompanyID = oRs("companyID")

help??

Lori





  Return to Index