Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset Type Mismatch

Status
Not open for further replies.

travisbrown

Technical User
Dec 31, 2001
1,016
Why would I be getting a type mismatch on Folio = rs.GetRows() in the first example? I regularly set the function name as the result array when creating recordsets from a database, like in the second example. Why is this any different?


Code:
SET fs = CreateObject("Scripting.FileSystemObject")  
SET folder = fs.GetFolder(folio_path)  
SET fc = folder.files	
	
DIM rs
SET rs = createobject("adodb.recordset")
WITH rs.Fields
	.Append "file_name", adChar, 255
END WITH
rs.Open
	
FOR EACH file in fc  
	rs.AddNew
	rs("file_name") = file.name
	rs.Update
NEXT
	
IF NOT rs.BOF AND NOT rs.EOF THEN
	Folio = rs.GetRows()
END IF
rs.close
SET rs = Nothing

Code:
MyRecordset(input)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = dbconn
rs.Source = input
rs.Open()
IF NOT rs.EOF AND NOT rs.BOF THEN
   MyRecordset = rs.GetRows()
END IF
rs.Close()
Set rs = Nothing

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top