Home
Manage Your Code
Snippet: Recordset Call (ASP)
Title: Recordset Call Language: ASP
Description: This function performs a recordset call. You just need to pass in the SQL stirng and it will do the rest. Be sure to setup the ADO connection string in the Global.asa page. Views: 77
Author: Steve Ollinger Date Added: 10/7/2008
Copy Code  
function getRecords(strSQL)

	Dim rsTemp
	Set rsTemp = Server.CreateObject("ADODB.Recordset")
	
	with rsTemp
		.activeConnection = Session("ADOSQLConnection")
		.cursorLocation = 2
		.cursorType = 0
		.lockType = 3
		.Source = strSQL
		.Open()
	end with
	
	Set getRecords = rsTemp
	
end function