cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount
oggetto Recordset

1. creare un recordset

Dim objRS Set objRS=Server.CreateObject("ADODB.Recordset")

2. aprire un Recordset e popolarlo

objRS.Open source, connection, cursortype, locktype, commandtype

source � la tabella o la query o la stored procedure connection � la connessione che deve essere fatta prima cursortype � il cursore (di solito ForwardOnly) locktype � il bloccaggio commandtype � il es.: objRS.Open "Tabella1", objConn, adOpenForwardOnly, adLockReadOnly, adcmdTable per non usare il nomi estesi,
esiste il file adovbs.inc che contiene le costanti di ASP Const adOpenForwardOnly = 0 Const adLockOptimistic = 3 Const adLockPessimistic = 2 Const adLockReadOnly = 1 Const adcmdTable = 2 Cos� si pu� scrivere: objRS.Open "Tabella1", objConn, 0, 1, 2

3. accedere ai dati della tabella

� accessibile un solo record alla volta, per cui � sufficiente il nome del campo:

objRS("FiledName")

utilizzare i metodi per muoversi nella tabella:

objRS.MoveNext (e, se il cursore lo permette, MovePrevious, MoveFirst, MoveLast, Move n)

utilizzare la propriet� EOF per scorrere la tabella:

Do While Not objRS.EOF Response.Write objRS("FiledName") & "<BR>" objRS.MoveNext Loop

4. modificare i dati della tabella

se il bloccaggio lo permette, utilizzare i metodi:

objRS.AddNew, objRS.Update, objRS.Delete

5. chiudere il Recordset

objRS.Close Set objRS = Nothing

6. la collection Fields

quando si scrive: objRS("FiledName"), in realt� si fa riferimento implicito alla collection Fields che ha le propriet�: Name, Value, Type, Precision, NumericScale, DefinedSize, ActualSize

For iLoop = 0 to ojbRS.Fields.Count - 1 Response.Write "Name=" & ojbRS.Fields(iLoop).Name & "<br>" Response.Write "Value=" & ojbRS.Fields(iLoop).Value & "<br>" ... Response.Write "ActualSize=" & ojbRS.Fields(iLoop).ActualSize & "<br>" Next

creazione implicita (sconsigliata)

si pu� utilizzare il metodo Execute dell'oggetto Connect:
il cursore e il bloccaggio avranno il valore default

Dim objConn Set objConn=Server.CreateObject("ADODB.Connection") objConn.Open strInfoConnessione[, Username, Password] Set objRS = objConn.Execute("SELECT * FROM Tabella")