I am creating a recordset to an AS400 file via ODBC. I want the
recordset to be Static so I am setting the CursorType property to
adOpenStatic just prior to the recordset Open statement. The Open
statement is causing the recordset to be Dynamic.
Any ideas as to why this is happening? And is there a way to prevent it?
Here is the code:
Dim sConnect As String
Dim cnDownload As ADODB.Connection
Dim SchedProdRS AS ADODB.Recordset
sConnect = "ODBC;Database=DOWNLOAD;UID=" & gsUserName & ";PWD=" & _
gsPassword & ";DSN=AS400;"
Set cnDownload = New ADODB.Connection
Set SchedProdRS = New ADODB.Recordset
SchedProdRS.CursorType = adOpenStatic
SchedProdRS.LockType = adLockReadOnly
SchedProdRS.Open "select * from DOWNLOAD.TestFile" , cnDownload