webForumDet fria alternativet

1 raden...

ASPur ASP

4 svar · 193 visningar · startad av Zandris

Medlem sedan feb. 200160 inlägg
Frågan#1

Hej!

Jag har en liten fråga:

Hur ser koden ut som gör att markören i databasen ställer sig på första raden i en tabell?

MVH Zandra

Medlem sedan juni 200032 967 inlägg
#2

Hmm, lite osäker på vad du menar?

Menar du att du vill flytta cursorn överst i ett recordset du öppnat på din asp-sida?

I så fall:

objRS.movefirst

Krävs dock att ditt recordset inte öppnats forward-only.

Mvh,

------------------
Don't panic!

Medlem sedan dec. 200012 464 inlägg
#3

Krävs dock att ditt recordset inte öppnats forward-only.

Nej, inte enligt dokumentationen i alla fall.

If the Recordset is forward only and you want to support both forward and backward scrolling, you can use the CacheSize property to create a record cache that will support backward cursor movement through the Move method. Because cached records are loaded into memory, you should avoid caching more records than is necessary. You can call the MoveFirst method in a forward-only Recordset object; doing so may cause the provider to re-execute the command that generated the Recordset object.

------------------
essentitia preter non sans multiplicandum

Medlem sedan juni 200032 967 inlägg
#4

Tack LarsG! :)

Mvh,

------------------
Don't panic!

Medlem sedan feb. 200160 inlägg
#5

Tack för hjälpen!

MVH Zandra

128 ms totalt · 3 externa anrop · v20260731065814-full.4bcf49fe
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
125 ms — hämta tråd, inlägg och bilagor (db)