IF not RecSet.EOF THEN
arrRecords = RecSet.GetRows()
citatText = arrRecords(0, 0)
citatNamn = arrRecords(1, 0)
End if
RecSet.Close
Set RecSet = nothing
Connect.Close
Set Connect = nothing
Frågan#1
Så här ser koden ut:
IF RecSet.EOF THEN
RecSet.Close
Set RecSet = nothing
Connect.Close
Set Connect = nothing
ELSE
arrRecords = RecSet.GetRows()
RecSet.Close
Set RecSet = nothing
Connect.Close
Set Connect = nothing
citatText = arrRecords(0, 0)
citatNamn = arrRecords(1, 0)
End if
Jag vill att databasen ska stängas så fort som möjligt och undvika att skriva samma stängning av objekt på två ställen...nån?
------------------
Alltid lär man sig något nytt varje dag...
