Problem creating a populated ado recordset
- From: franky <franky@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 14:34:26 -0700
Hello,
I'm creating an ADO recordset and having problems with the result returning
a recordset without data. If the sql statement contains "SELECT *" then a
recordset is not created; rst.eof = TRUE. However, if I limit the select
statement to four fields it returns a recordset with data; rst.eof=false.
Selecting more then four fields will cause no data to be returned. Any
sugestions?
Below is the code i'm using... I've also tried setting the
cnn1.commandtimeout = 100000. Still having same problem.
Dim cnn1 As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strCnn As String
Dim sql As String
Set cnn1 = New ADODB.Connection
strCnn = "Provider=vfpoledb;" & _
"Data Source=\\Sbtserver\pag\pro30\prodata.dbc; Collating
Sequence=MACHINE"
cnn1.Open strCnn
Set rst = New ADODB.Recordset
Set rst.ActiveConnection = cnn1
With rst
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
End WIth
sql = "SELECT *" & _
" FROM icitem01 WHERE Item = 'HF02-00856786'"
rstNote.Open sql
I must limit the select statement to a max of four fields to get a recordset
populated with data returned. IE. Select field1, field2, field3, field4 FROM
.... Wierd.
Thanks in advance!
.
- Follow-Ups:
- Re: Problem creating a populated ado recordset
- From: Stephen Howe
- Re: Problem creating a populated ado recordset
- Prev by Date: can ado.net connect to Oracle on a unix machine?
- Next by Date: RE: ADO update to VFP database
- Previous by thread: can ado.net connect to Oracle on a unix machine?
- Next by thread: Re: Problem creating a populated ado recordset
- Index(es):
Relevant Pages
|
|