About update access database data by using ASP
am 23.05.2007 07:54:07 von yuling3086
Hi All,
I have a web that i need to update several table at a page and at the same
time when user click on the update button.May I know that how to speed up the
update process?I am using Access database.
Please advice.
thanks
Re: About update access database data by using ASP
am 23.05.2007 15:05:26 von reb01501
yuling3086 wrote:
> Hi All,
>
> I have a web that i need to update several table at a page and at the
> same time when user click on the update button.May I know that how to
> speed up the update process?I am using Access database.
>
> Please advice.
>
Again, you leave us with no way to specifically answer the question.
Some general performance tips:
Get in and immediately get out. Do not keep database connections open
any longer than you need to. Open the connection immediately before you
need to use it. Close it immediately after your last database-related
task on the page is performed. The rest of the tips are geared toward
achieving this result.
Don't use recordsets for data maintenance. Recordsets should be used
solely for retrieving read-only data for display or computations. Avoid
recordset loops:
http://databases.aspfaq.com/database/should-i-use-recordset- iteration-or-getrows-or-getstring.html
(My preference is to use GetRows arrays - but disconnected, client-side
recordsets are fine if you need cursor functionality)
Instead, use SQL DML (Data Modification Language - INSERT, UPDATE and
DELETE).
But don't resort to dynamic sql. Use parameters, either via saved
parameter queries (my preference):
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&sel m=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1& selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl
or via parameter markers in your sql strings:
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/72e36562fee7804e
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.