Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Closing a recordset
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Closing a recordset

 Post Reply Post Reply Page  <12
Author
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2004 at 9:02am

Originally posted by Semikolon Semikolon wrote:

if you Open, then Close
if you Set, then Set to Nothing

not all methods has Close options

I meant to say that - <sigh>


Lead me not into temptation... I know the short cut, follow me.
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2004 at 1:12pm
okay 
Back to Top
witje View Drop Down
Newbie
Newbie


Joined: 25 May 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote witje Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2004 at 4:37pm

Thx for the replys...

Okey im closing all my records now automaticly once i open a new one but my website is still slow

The Open/Close process goes like this now:

Set Rs = Con.Execute("bla")
Rs.Close
Set Rs = Con.Execute("bla")
Rs.Close
Set Rs = Server.CreateObject("ADODB.Recordset")
Set Rs.ActiveConnection = Con
Rs.Open "bla"
Rs.Close
Set Rs = Server.CreateObject("ADODB.Recordset")
Set Rs.ActiveConnection = Con
Rs.Open "bla"
Rs.Close
Set Rs = Con.Execute("bla")

etc...

Set Rs = Nothing
Con.Close
Set Con = Nothing

so is that the proper way of opening and closing records?

Back to Top
witje View Drop Down
Newbie
Newbie


Joined: 25 May 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote witje Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2004 at 6:06pm

anyone?

Somehow my website is really slow... ofcourse it could also be the host but i gotta make sure im doing the record-set and the connection stuff good first...

Maybe this questions are a bit noobish for you guys but i just started asp 4 weeks ago, i always use to make websites with php.

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2004 at 6:33pm
The only thing I would note that's db specific would be to make sure you're using DSN-less connections and to use the Jet4.0 driver.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
witje View Drop Down
Newbie
Newbie


Joined: 25 May 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote witje Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2004 at 7:18pm

Im using a DNS less connection with Jet4.0

SQLDBPath = Server.MapPath("db/****.mdb")
SQLDBPassword = ""

ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SQLDBPath & ";Jet OLEDB:Database Password=" & SQLDBPassword & ";"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open ConStr

guess its my host then...

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2004 at 6:14am
or your database.. it it's a big acess database you should consider moving to SQL Server
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2004 at 8:01am

Access gets out of whack pretty quickly if your site does a lot of deletions and/or inserts. I's really just one big sequential file. Doing a compact and repair on it will recover any space from deletions and restructure the inexes to work faster.

Also, make sure that any lookup fields are indexed.



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.