QueryString Parameter

QueryString Parameter

am 09.05.2007 03:20:21 von rn5a

A MS-Access database table has 2 columns - UserID (unique) of number
data type & UserName (text) along with some other columns.

When users come to a particular page, say, AllUsers.asp, all the
UserNames are displayed to him as hyperlinks. Based on the UserName
clicked by a user, the next page (to which the user will be taken to
when he clicks any of the UserNames) will display more information
about that particular UserName (which the user had clicked).Assume
that the page where more info is displayed is named UserInfo.asp.
(Note that the info will also be retrieved from the DB table).
UserInfo.asp will also display the UserName the user had just clciked
in AllUsers.asp.

Now for UserInfo.asp to retrieve data about the UserName the user has
just clicked, I can make the links in AllUsers.asp pass the UserID as
well as the UserName as a querystring value. Now whcih one will be
more efficient - sending the UserID as the querystrinng value or
sending the UserName as the querystring value?

Re: QueryString Parameter

am 09.05.2007 03:33:01 von rn5a

On May 9, 6:20 am, r...@rediffmail.com wrote:
> A MS-Access database table has 2 columns - UserID (unique) of number
> data type & UserName (text) along with some other columns.
>
> When users come to a particular page, say, AllUsers.asp, all the
> UserNames are displayed to him as hyperlinks. Based on the UserName
> clicked by a user, the next page (to which the user will be taken to
> when he clicks any of the UserNames) will display more information
> about that particular UserName (which the user had clicked).Assume
> that the page where more info is displayed is named UserInfo.asp.
> (Note that the info will also be retrieved from the DB table).
> UserInfo.asp will also display the UserName the user had just clciked
> in AllUsers.asp.
>
> Now for UserInfo.asp to retrieve data about the UserName the user has
> just clicked, I can make the links in AllUsers.asp pass the UserID as
> well as the UserName as a querystring value. Now whcih one will be
> more efficient - sending the UserID as the querystrinng value or
> sending the UserName as the querystring value?

ADDENDUM:
------------------

Sorry made some changes to the app. Here's the revised post:

When a user clicks a UserName in AllUsers.asp, he is first taken to an
ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
links clicking which takes the user to UserInfo.asp which displays all
the UserName info.

Now Page1.asp displays a calendar & should also display the UserName
just clicked. As such, Page1.asp doesn't interact with the MS-Access
DB table. If I pass the UserID as the querystring value from
AllUsers.asp to Page1.asp, then that means I have to get the UserName
from the DB table since I am only passing the UserID as the
querystring value & not the UserName. On the other hand, if I pass
UserName as the querystring value from AllUsers.asp to Page1.asp, then
there won't be any need for Page1.asp to interact with the DB table.

So passing UserID as the querystring value which involves database
communication is recommended or passing UserName as the querystring
value which doesn't involve any database communication is recommended?

Re: QueryString Parameter

am 09.05.2007 09:20:33 von Mike Brind

wrote in message
news:1178674381.289929.212450@e65g2000hsc.googlegroups.com.. .
> On May 9, 6:20 am, r...@rediffmail.com wrote:
>> A MS-Access database table has 2 columns - UserID (unique) of number
>> data type & UserName (text) along with some other columns.
>>
>> When users come to a particular page, say, AllUsers.asp, all the
>> UserNames are displayed to him as hyperlinks. Based on the UserName
>> clicked by a user, the next page (to which the user will be taken to
>> when he clicks any of the UserNames) will display more information
>> about that particular UserName (which the user had clicked).Assume
>> that the page where more info is displayed is named UserInfo.asp.
>> (Note that the info will also be retrieved from the DB table).
>> UserInfo.asp will also display the UserName the user had just clciked
>> in AllUsers.asp.
>>
>> Now for UserInfo.asp to retrieve data about the UserName the user has
>> just clicked, I can make the links in AllUsers.asp pass the UserID as
>> well as the UserName as a querystring value. Now whcih one will be
>> more efficient - sending the UserID as the querystrinng value or
>> sending the UserName as the querystring value?
>
> ADDENDUM:
> ------------------
>
> Sorry made some changes to the app. Here's the revised post:
>
> When a user clicks a UserName in AllUsers.asp, he is first taken to an
> ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
> links clicking which takes the user to UserInfo.asp which displays all
> the UserName info.
>
> Now Page1.asp displays a calendar & should also display the UserName
> just clicked. As such, Page1.asp doesn't interact with the MS-Access
> DB table. If I pass the UserID as the querystring value from
> AllUsers.asp to Page1.asp, then that means I have to get the UserName
> from the DB table since I am only passing the UserID as the
> querystring value & not the UserName. On the other hand, if I pass
> UserName as the querystring value from AllUsers.asp to Page1.asp, then
> there won't be any need for Page1.asp to interact with the DB table.
>
> So passing UserID as the querystring value which involves database
> communication is recommended or passing UserName as the querystring
> value which doesn't involve any database communication is recommended?
>

You're just thinking out loud, aren't you?

--
Mike Brind

Re: QueryString Parameter

am 09.05.2007 15:36:45 von rn5a

On May 9, 12:20 pm, "Mike Brind" wrote:
> wrote in message
>
> news:1178674381.289929.212450@e65g2000hsc.googlegroups.com.. .
>
>
>
>
>
> > On May 9, 6:20 am, r...@rediffmail.com wrote:
> >> A MS-Access database table has 2 columns - UserID (unique) of number
> >> data type & UserName (text) along with some other columns.
>
> >> When users come to a particular page, say, AllUsers.asp, all the
> >> UserNames are displayed to him as hyperlinks. Based on the UserName
> >> clicked by a user, the next page (to which the user will be taken to
> >> when he clicks any of the UserNames) will display more information
> >> about that particular UserName (which the user had clicked).Assume
> >> that the page where more info is displayed is named UserInfo.asp.
> >> (Note that the info will also be retrieved from the DB table).
> >> UserInfo.asp will also display the UserName the user had just clciked
> >> in AllUsers.asp.
>
> >> Now for UserInfo.asp to retrieve data about the UserName the user has
> >> just clicked, I can make the links in AllUsers.asp pass the UserID as
> >> well as the UserName as a querystring value. Now whcih one will be
> >> more efficient - sending the UserID as the querystrinng value or
> >> sending the UserName as the querystring value?
>
> > ADDENDUM:
> > ------------------
>
> > Sorry made some changes to the app. Here's the revised post:
>
> > When a user clicks a UserName in AllUsers.asp, he is first taken to an
> > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
> > links clicking which takes the user to UserInfo.asp which displays all
> > the UserName info.
>
> > Now Page1.asp displays a calendar & should also display the UserName
> > just clicked. As such, Page1.asp doesn't interact with the MS-Access
> > DB table. If I pass the UserID as the querystring value from
> > AllUsers.asp to Page1.asp, then that means I have to get the UserName
> > from the DB table since I am only passing the UserID as the
> > querystring value & not the UserName. On the other hand, if I pass
> > UserName as the querystring value from AllUsers.asp to Page1.asp, then
> > there won't be any need for Page1.asp to interact with the DB table.
>
> > So passing UserID as the querystring value which involves database
> > communication is recommended or passing UserName as the querystring
> > value which doesn't involve any database communication is recommended?
>
> You're just thinking out loud, aren't you?
>
> --
> Mike Brind- Hide quoted text -
>
> - Show quoted text -

Sorry, Mike, I couldn't exactly get you....

Re: QueryString Parameter

am 09.05.2007 22:30:33 von Mike Brind

wrote in message
news:1178717805.590371.271500@y5g2000hsa.googlegroups.com...
> On May 9, 12:20 pm, "Mike Brind" wrote:
>> wrote in message
>>
>> news:1178674381.289929.212450@e65g2000hsc.googlegroups.com.. .
>>
>>
>>
>>
>>
>> > On May 9, 6:20 am, r...@rediffmail.com wrote:
>> >> A MS-Access database table has 2 columns - UserID (unique) of number
>> >> data type & UserName (text) along with some other columns.
>>
>> >> When users come to a particular page, say, AllUsers.asp, all the
>> >> UserNames are displayed to him as hyperlinks. Based on the UserName
>> >> clicked by a user, the next page (to which the user will be taken to
>> >> when he clicks any of the UserNames) will display more information
>> >> about that particular UserName (which the user had clicked).Assume
>> >> that the page where more info is displayed is named UserInfo.asp.
>> >> (Note that the info will also be retrieved from the DB table).
>> >> UserInfo.asp will also display the UserName the user had just clciked
>> >> in AllUsers.asp.
>>
>> >> Now for UserInfo.asp to retrieve data about the UserName the user has
>> >> just clicked, I can make the links in AllUsers.asp pass the UserID as
>> >> well as the UserName as a querystring value. Now whcih one will be
>> >> more efficient - sending the UserID as the querystrinng value or
>> >> sending the UserName as the querystring value?
>>
>> > ADDENDUM:
>> > ------------------
>>
>> > Sorry made some changes to the app. Here's the revised post:
>>
>> > When a user clicks a UserName in AllUsers.asp, he is first taken to an
>> > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
>> > links clicking which takes the user to UserInfo.asp which displays all
>> > the UserName info.
>>
>> > Now Page1.asp displays a calendar & should also display the UserName
>> > just clicked. As such, Page1.asp doesn't interact with the MS-Access
>> > DB table. If I pass the UserID as the querystring value from
>> > AllUsers.asp to Page1.asp, then that means I have to get the UserName
>> > from the DB table since I am only passing the UserID as the
>> > querystring value & not the UserName. On the other hand, if I pass
>> > UserName as the querystring value from AllUsers.asp to Page1.asp, then
>> > there won't be any need for Page1.asp to interact with the DB table.
>>
>> > So passing UserID as the querystring value which involves database
>> > communication is recommended or passing UserName as the querystring
>> > value which doesn't involve any database communication is recommended?
>>
>> You're just thinking out loud, aren't you?
>>
>> --
>> Mike Brind- Hide quoted text -
>>
>> - Show quoted text -
>
> Sorry, Mike, I couldn't exactly get you....
>

Well, calls to databases are expensive, and a good way to hamper the
scalability of a site. So the rule of thumb is only make calls when
absolutely necessary, and make them as short and sweet as possible. If you
already have a value on page1, and passing that value to page2 using the
querystring makes it available to that page thus negating an expensive
additional and unnecessary call to the database, I would have thought the
answer was self-evident.

Your post reads like someone mentally weighing up 2 options out loud, only
to arrive at the correct answer themselves, and therefore not requiring an
answer from anyone else. Hence my equally rhetorical response :-)

--
Mike Brind

Re: QueryString Parameter

am 10.05.2007 01:05:03 von rn5a

On May 10, 1:30 am, "Mike Brind" wrote:
> wrote in message
>
> news:1178717805.590371.271500@y5g2000hsa.googlegroups.com...
>
>
>
>
>
> > On May 9, 12:20 pm, "Mike Brind" wrote:
> >> wrote in message
>
> >>news:1178674381.289929.212450@e65g2000hsc.googlegroups.com ...
>
> >> > On May 9, 6:20 am, r...@rediffmail.com wrote:
> >> >> A MS-Access database table has 2 columns - UserID (unique) of number
> >> >> data type & UserName (text) along with some other columns.
>
> >> >> When users come to a particular page, say, AllUsers.asp, all the
> >> >> UserNames are displayed to him as hyperlinks. Based on the UserName
> >> >> clicked by a user, the next page (to which the user will be taken to
> >> >> when he clicks any of the UserNames) will display more information
> >> >> about that particular UserName (which the user had clicked).Assume
> >> >> that the page where more info is displayed is named UserInfo.asp.
> >> >> (Note that the info will also be retrieved from the DB table).
> >> >> UserInfo.asp will also display the UserName the user had just clciked
> >> >> in AllUsers.asp.
>
> >> >> Now for UserInfo.asp to retrieve data about the UserName the user has
> >> >> just clicked, I can make the links in AllUsers.asp pass the UserID as
> >> >> well as the UserName as a querystring value. Now whcih one will be
> >> >> more efficient - sending the UserID as the querystrinng value or
> >> >> sending the UserName as the querystring value?
>
> >> > ADDENDUM:
> >> > ------------------
>
> >> > Sorry made some changes to the app. Here's the revised post:
>
> >> > When a user clicks a UserName in AllUsers.asp, he is first taken to an
> >> > ASP page named Page1.asp (& not UserInfo.asp). Page1.asp also has
> >> > links clicking which takes the user to UserInfo.asp which displays all
> >> > the UserName info.
>
> >> > Now Page1.asp displays a calendar & should also display the UserName
> >> > just clicked. As such, Page1.asp doesn't interact with the MS-Access
> >> > DB table. If I pass the UserID as the querystring value from
> >> > AllUsers.asp to Page1.asp, then that means I have to get the UserName
> >> > from the DB table since I am only passing the UserID as the
> >> > querystring value & not the UserName. On the other hand, if I pass
> >> > UserName as the querystring value from AllUsers.asp to Page1.asp, then
> >> > there won't be any need for Page1.asp to interact with the DB table.
>
> >> > So passing UserID as the querystring value which involves database
> >> > communication is recommended or passing UserName as the querystring
> >> > value which doesn't involve any database communication is recommended?
>
> >> You're just thinking out loud, aren't you?
>
> >> --
> >> Mike Brind- Hide quoted text -
>
> >> - Show quoted text -
>
> > Sorry, Mike, I couldn't exactly get you....
>
> Well, calls to databases are expensive, and a good way to hamper the
> scalability of a site. So the rule of thumb is only make calls when
> absolutely necessary, and make them as short and sweet as possible. If you
> already have a value on page1, and passing that value to page2 using the
> querystring makes it available to that page thus negating an expensive
> additional and unnecessary call to the database, I would have thought the
> answer was self-evident.
>
> Your post reads like someone mentally weighing up 2 options out loud, only
> to arrive at the correct answer themselves, and therefore not requiring an
> answer from anyone else. Hence my equally rhetorical response :-)
>
> --
> Mike Brind- Hide quoted text -
>
> - Show quoted text -

Thanks, Mike, for your answer. Actually my English is not so good;
that's the reason why I couldn't understand your first response.

Anyway, thanks once again,

Regards,

RON