webForumDet fria alternativet

Räcker RecSet.close och Connect.close?

ASP

14 svar · 294 visningar · startad av Lukaspojken

Medlem sedan maj 20011 312 inlägg
Frågan#1

När jag avslutar mina DB fråga så skriver jag...

RecSet.Close
Connect.Close

Jag minns att jag sett nånstans

RecSet = nothing

eller något liknande...ska man ta med det också?

Medlem sedan juni 200032 967 inlägg
#2

japp, ha med det också, så du förstör objektet.

RecSet.Close
Set RecSet = nothing
Connect.Close
Set Connect=nothing

mvh,

------------------
<A HREF="http://cartman.nu" TARGET=_blank>
nobody expects the spanish inquisition!</A>

Medlem sedan maj 2001431 inlägg
#3

Du kan gott skippa det redundanta
Set rs = Nothing

------------------
For seeing life is but a motion of limbs,* the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life?

Medlem sedan maj 20011 312 inlägg
#4

Skippa

Set RecSet = nothing

men inte

Set Connect = nothing

eller?

Medlem sedan feb. 20012 412 inlägg
#5

städa alltid bort objekten när de är använda:

RecSet.Close
Set RecSet = nothing
Connect.Close
Set Connect = nothing

alla 4 (ska) bör vara med

mvh jörgen

------------------
*** Det brukar lösa sig sade hon som satt och sket i vasken ***

[Redigerat av jorgen den 12 maj 2001]

Medlem sedan maj 2001431 inlägg
#6

Ja du kan gott skippa båda.

Set RecSet = nothing
Set Connect = nothing

------------------
For seeing life is but a motion of limbs,* the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life?

Medlem sedan maj 20011 312 inlägg
#7

Vad är nackdelarna att inte ta med det?

Medlem sedan juni 200032 967 inlägg
#8

herman, förklara?

------------------
<A HREF="http://cartman.nu" TARGET=_blank>
nobody expects the spanish inquisition!</A>

Medlem sedan maj 2001431 inlägg
#9

I praktiken ingen nackdel.

------------------
For seeing life is but a motion of limbs,* the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life?

Medlem sedan maj 2001431 inlägg
#10

Det man tjänar på att förstöra objekten direkt i ASP-sidan är lite minne som ändå förstörs efter att ASP-skriptet körts färdigt. Dvs. du får tillbaka minnesresurser ngt tidigare - kanske 10ms :)

------------------
For seeing life is but a motion of limbs,* the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life?

Medlem sedan juni 200032 967 inlägg
#11

varför ska man inte skippa .close också då?

------------------
<A HREF="http://cartman.nu" TARGET=_blank>
nobody expects the spanish inquisition!</A>

Medlem sedan maj 2001431 inlägg
#12

För att både Connection och Recordset kan ha en aktiv koppling till databasen som då inte vet att sidan är klar. Dvs. man ger inte databasen en signal att släppa resurserna.

------------------
For seeing life is but a motion of limbs,* the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life?

Medlem sedan juni 200032 967 inlägg
#13

gutes, då har vi rett ut det! :)

------------------
<A HREF="http://cartman.nu" TARGET=_blank>
nobody expects the spanish inquisition!</A>

[Redigerat av @nders den 12 maj 2001]

Medlem sedan maj 20011 312 inlägg
#14

Så lite minne kan man spara...det blir nog den lösningen då för min del...:)

Medlem sedan dec. 19996 522 inlägg
#15

Om man låt oss säga har 3 sidor som använder samma databaskoppling. Är det nödvändigt att använda sig av connect.close och set connect = nothing. Eftersom jag ändå öppnar databasen på nästa sida. Förstår ni vad jag menar ?

------------------
1 Man, 1 Million dead, The odds are just about even - Ash

266 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
131 ms — deklarationer (db)
0 ms — hämta statistik (cache)
131 ms — hämta tråd, inlägg och bilagor (db)
130 ms — ändringar (db)