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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server link definition

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
OK here is what i am trying to do i have all of these calls to different database tables in my document and esentialy the only difference in any of them is the name and the select string. So i figure why waste space with all this repeated junk. So i right this function:

<%
Function startDBQuery(query)
set dbQuery = Server.CreateObject(&quot;ADODB.Recordset&quot;)
dbQuery.ActiveConnection = MM_Conference_STRING
dbQuery.Source = query
dbQuery.CursorType = 0
dbQuery.CursorLocation = 2
dbQuery.LockType = 3
dbQuery.Open()
dbQuery_numRows = 0
startDBQuery=dbQuery
end function
%>

and import it into the document. problem well it does not like me doing it this way. It seems to be having a problem assigning the returned value to a pointer when it is done. or at the very least keeping it pointed at the same thing. Is this a pointer problem i am having or does it just not like me trying to assign things this way og by the way this is that statement i would use to assign this function return to a pointer:

set AttendeeMX = startDBQuery(&quot;SELECT max(AttendeeID) as MaxID FROM Attendees&quot;)

i get an error when i try to close the link. Any ideas as to what's going on here and whether or not this is even posible would be apreciatd

thanks
andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top