19. april 2002 - 23:02Der er
3 kommentarer og 1 løsning
Hvad betyder denne kode?
Jeg er ved at skrive en eksames-opgave, blandt andet om ASP. Jeg har flg. kode som jeg skal forklare, det jeg ikke kan finde ud af er konstanterne 2, 3, &H0001 på den sidste linie, nogle forslag?? strconn = "driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/db/hej.mdb") set objRS = server.createObject("ADODB.RECORDSET") objRS.open "SELECT * FROM besked", strconn, 2, 3, &H0001
Cursortype: 0: adOpenForwardOnly (Default) Opens a forward-only–type cursor. 1: adOpenKeyset Opens a keyset-type cursor. 2: adOpenDynamic Opens a dynamic-type cursor. 3: adOpenStatic Opens a static-type cursor.
LockType: 1: adLockReadOnly (Default) Read-only—you cannot alter the data. 2: adLockPessimistic Pessimistic locking, record by record—the provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately upon editing. 3: adLockOptimistic Optimistic locking, record by record—the provider uses optimistic locking, locking records only when you call the Update method. 4:adLockBatchOptimistic Optimistic batch updates—required for batch update mode as opposed to immediate update mode.
Option: 1: adCmdText Indicates that the provider should evaluate Source as a textual definition of a command. 2: adCmdTable Indicates that ADO should generate an SQL query to return all rows from the table named in Source. 512: adCmdTableDirect Indicates that the provider should return all rows from the table named in Source. 4: adCmdStoredProc Indicates that the provider should evaluate Source as a stored procedure. 8: adCmdUnknown Indicates that the type of command in the Source argument is not known. 256: adCmdFile Indicates that the persisted (saved) Recordset should be restored from the file named in Source. 16: adAsyncExecute Indicates that the Source should be executed asynchronously. 32: adAsyncFetch Indicates that after the initial quantity specified in the Initial Fetch Size property is fetched, any remaining rows should be fetched asynchronously. If a row is required that has not been fetched, the main thread is blocked until the requested row becomes available. 64: adAsyncFetchNonBlocking Indicates that the main thread never blocks while fetching. If the requested row has not been fetched, the current row automatically moves to the end of the file.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.