[thelist] VB6/ADO GetString compile error

Tab Alleman Tab.Alleman at MetroGuide.com
Mon Feb 9 12:20:53 CST 2004

I am executing a sproc from VB that returns multiple record sets, which
I want to use to build a big long string.  I discovered the GetString()
method of the ADO recordset object and thought I was in business, but
when I try to invoke it, I get a "Object Required" error on the
GetString method, even though as I was typing the line in the code, the
"GetString" method came up in the autocomplete window for the RecordSet
object, so I thought I was golden.  What could I be doing wrong?

Ok, here are what I believe to be the pertinent exerpts of VB code:

Public rsSprocReturn As New ADODB.Recordset
Dim NewStr As Variant
Set rsSprocReturn = cmd.Execute
Do Until rsSprocReturn Is Nothing
	If Not rsSprocReturn.State = adStateClosed Then
		If Not (rsSprocReturn.EOF And rsSprocReturn.BOF) Then
			Set NewStr = rsSprocReturn.GetString   '<-- line
with error 
			ReportStr = ReportStr & vbCrLf & CStr(NewStr) &
		End If
	End If
	Set rsSprocReturn = rsSprocReturn.NextRecordset()

The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **

More information about the thelist mailing list