p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: refresh content


Message #1 by "Dana Coffey" <dcoffey@x...> on Wed, 5 Jul 2000 10:46:42 -0400
Is there a way to refresh the content of a page just one time after the user

arrives there.  I am adding a record to the database in the code, and then

displaying a list of related records beneath the confirmation message.  The

trouble is that unless I click the refresh button, the current added record

does not show up in the list.  Any advice please?



Thanks

dc





Dana Coffey

Technologist, Xceed, Inc.

112 Krog St.  Atlanta, GA  30307

tel.  xxx-xxx-xxxx  x 5013 

dcoffey@x...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Everything should be as simple as it is, but not simpler. 

----Albert Einstein 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #2 by "yls" <yls177@h...> on Wed, 5 Jul 2000 11:03:09 +0800
response.flush may help though i had never tried that before ;p

Dana Coffey wrote in message news:6358@a..._databases...

>

> Is there a way to refresh the content of a page just one time after the

user

> arrives there.  I am adding a record to the database in the code, and then

> displaying a list of related records beneath the confirmation message.

The

> trouble is that unless I click the refresh button, the current added

record

> does not show up in the list.  Any advice please?

>

> Thanks

> dc

>

>

> Dana Coffey

> Technologist, Xceed, Inc.

> 112 Krog St.  Atlanta, GA  30307

> tel.  xxx-xxx-xxxx  x 5013

> dcoffey@x...

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Everything should be as simple as it is, but not simpler.

> ----Albert Einstein

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>





Message #3 by "Ken Schaefer" <ken.s@a...> on Thu, 6 Jul 2000 11:35:43 +1000
Dana,



How are you adding the record and then displaying it? Are you doing a new

"SELECT"? Or are you using the existing recordset?



Also, there is a little problem with Access in that sometimes a newly added

record doesn't seem to become immediately visible...



Cheers

Ken



----- Original Message -----

From: "Dana Coffey" 

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, July 06, 2000 12:46 AM

Subject: [asp_databases] refresh content







Message #4 by "Dana Coffey" <dcoffey@x...> on Thu, 6 Jul 2000 07:41:54 -0700
I'm doing a new "SELECT".



I first add the record to one table.  Then I query that table along with 3

others (that was my complex join statement last week on the list)to show

only the records that relate to an employee number that was passed in a

querystring.



I'm using that dreaded recordset method you advised me not to use.  I intend

to change it once I've played with the other method more, but for now this

will do.  This part of the site is user admin and will never get

simultaneous users, etc, so performance is not quite as large an issue.



It's interesting actually.  There's another bug with this.  On the first

page, an account manager is assigned several companies for which she is

responsible.  The page that updates the table then will list all the

companies that this manager is assigned to, including the new ones.  If I

choose more than one company from the first page, only the first company

shows in the list.  If I click refresh, then all 3 will, but sometimes, it

also lists that first one again...



I'm afraid I am going to have to come up with a work around such as calling

a separate page altogether to list the companies - I tried this and it

performs correctly.  I am not experienced enough in ASP to keep playing with

it and still make my deadline.



Thanks for any help!!





Dana Coffey

Technologist, Xceed, Inc.

112 Krog St.  Atlanta, GA  30307

tel.  xxx-xxx-xxxx  x 5013

www.xceed.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Everything should be as simple as it is, but not simpler.

----Albert Einstein

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~







-----Original Message-----

From: Ken Schaefer []

Sent: Wednesday, July 05, 2000 6:36 PM

To: ASP Databases

Subject: [asp_databases] Re: refresh content





Dana,



How are you adding the record and then displaying it? Are you doing a new

"SELECT"? Or are you using the existing recordset?



Also, there is a little problem with Access in that sometimes a newly added

record doesn't seem to become immediately visible...



Cheers

Ken



----- Original Message -----

From: "Dana Coffey"

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, July 06, 2000 12:46 AM

Subject: [asp_databases] refresh content









Message #5 by "yls" <yls177@h...> on Wed, 5 Jul 2000 20:48:08 +0800
Why recordset is a dreaded method?



Dana Coffey wrote in message news:6415@a..._databases...

>

> I'm doing a new "SELECT".

>

> I first add the record to one table.  Then I query that table along with 3

> others (that was my complex join statement last week on the list)to show

> only the records that relate to an employee number that was passed in a

> querystring.

>

> I'm using that dreaded recordset method you advised me not to use.  I

intend

> to change it once I've played with the other method more, but for now this

> will do.  This part of the site is user admin and will never get

> simultaneous users, etc, so performance is not quite as large an issue.

>

> It's interesting actually.  There's another bug with this.  On the first

> page, an account manager is assigned several companies for which she is

> responsible.  The page that updates the table then will list all the

> companies that this manager is assigned to, including the new ones.  If I

> choose more than one company from the first page, only the first company

> shows in the list.  If I click refresh, then all 3 will, but sometimes, it

> also lists that first one again...

>

> I'm afraid I am going to have to come up with a work around such as

calling

> a separate page altogether to list the companies - I tried this and it

> performs correctly.  I am not experienced enough in ASP to keep playing

with

> it and still make my deadline.

>

> Thanks for any help!!

>

>

> Dana Coffey

> Technologist, Xceed, Inc.

> 112 Krog St.  Atlanta, GA  30307

> tel.  xxx-xxx-xxxx  x 5013

> www.xceed.com

>

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Everything should be as simple as it is, but not simpler.

> ----Albert Einstein

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<munged>
Message #6 by "Ken Schaefer" <ken.s@a...> on Fri, 7 Jul 2000 13:24:06 +1000

> Why recordset is a dreaded method?



This method:



objRS.Open "TableName", strConnect, adLockForwardOnly, adLockOptimistic,

adCmdTable

objRS.AddNew

objRS.Update

objRS.Close



is about the slowest way there is to add a record - because you are

retrieving the whole table just to add a single record. If you're using

Access avoid it if you can.



Executing an INSERT SQL statement is faster.



Cheers

Ken




  Return to Index