Ask a Question related to ASP Database, Design and Development.
-
Michael Bosco #1
holding a connection object across several ASP pages
Hi. I am new to ASP. I need to create a "wizard" using a SQL 7
database that will display a few forms and collect data from the user.
My initial thought to handle this is to build my connection on the
first page and begin a transaction. As the user progresses through
the different screens, I would insert the data and finally commit the
data on the last page. The user will always have a cancel button
available to them for the rollback. However, with this method, the
connection object would have to be available to all the pages. With
the little ASP experience I have, I've found that all objects created
in a page is only available to that one page. Is it possible to have
my connection object available for all the necessary pages? This is
just my first crack at this, so if anyone can think of a better way to
do this, that would be appreciated also. Thanks for all the help.
Mike
Michael Bosco Guest
-
User Connection Settings Not Holding
When I send a connection key to a user of Contribute 4, the user is getting the following error when trying to implement the connection key: Your... -
Database Connection Object
1. Check out the microsoft application blocks - data access - http://support.microsoft.com/default.aspx?scid=kb;en-us;829028 2. Check out the... -
Unable to resize object in proportion by holding shift key
When selecting an object (text or otherwise) I have been able to constrain proportion by holding down shift while draging the object larger/smaller.... -
Connection object
I have inherited the following code from an existing system login asp page in my company. I am connecting to the same database and have been told to... -
Holding a reference to a ruby object outside the interpreter
How can I hold a reference to a ruby object outside the interpreter? Ie, how can I prevent it from being garbage collected if my (external)... -
Ray at #2
Re: holding a connection object across several ASP pages
It is outstanding that you asked, because you could have wound up taking the
wrong path. :]
In my opinion, it is better that you just carry your data from page to page
by some other means (cookies, session variables, hidden inputs on forms,
querystring) and then on the final "committal" page, when the user submits,
that is when you connect to your DB and insert the data.
While it is possible to open a connection to a DB and carry it from page to
page, it is <strong>strongly ill-advised</strong>. Also, if you did do this
and your users cancelled, you'd have a bunch of meaningless, incomplete data
in your database, well, except that you said you'd do it as a transaction,
so I guess you're thinking you'd roll back. My suggestion is to make one
connection on the final page and don't touch the DB before that (unless you
need to for other reasons of course).
Ray at work
"Michael Bosco" <mbosco51@si.rr.com> wrote in message
news:2ccffbac.0401211431.6c920e26@posting.google.c om...> Hi. I am new to ASP. I need to create a "wizard" using a SQL 7
> database that will display a few forms and collect data from the user.
> My initial thought to handle this is to build my connection on the
> first page and begin a transaction. As the user progresses through
> the different screens, I would insert the data and finally commit the
> data on the last page. The user will always have a cancel button
> available to them for the rollback. However, with this method, the
> connection object would have to be available to all the pages. With
> the little ASP experience I have, I've found that all objects created
> in a page is only available to that one page. Is it possible to have
> my connection object available for all the necessary pages? This is
> just my first crack at this, so if anyone can think of a better way to
> do this, that would be appreciated also. Thanks for all the help.
>
> Mike
Ray at Guest
-
Tom Kaminski [MVP] #3
Re: holding a connection object across several ASP pages
"Michael Bosco" <mbosco51@si.rr.com> wrote in message
news:2ccffbac.0401211431.6c920e26@posting.google.c om...Bad idea ...> Hi. I am new to ASP. I need to create a "wizard" using a SQL 7
> database that will display a few forms and collect data from the user.
> My initial thought to handle this is to build my connection on the
> first page and begin a transaction. As the user progresses through
> the different screens, I would insert the data and finally commit the
> data on the last page. The user will always have a cancel button
> available to them for the rollback. However, with this method, the
> connection object would have to be available to all the pages. With
> the little ASP experience I have, I've found that all objects created
> in a page is only available to that one page. Is it possible to have
> my connection object available for all the necessary pages? This is
> just my first crack at this, so if anyone can think of a better way to
> do this, that would be appreciated also. Thanks for all the help.
[url]http://www.aspfaq.com/show.asp?id=2053[/url]
--
Tom Kaminski IIS MVP
[url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
[url]http://mvp.support.microsoft.com/[/url]
[url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]
Tom Kaminski [MVP] Guest



Reply With Quote

