
August 2nd, 2000, 04:02 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Record Sets
<i><b>Originally posted by : Zack (zevans@vertical.net)</b></i><br />I am trying to use a recordset as sort of a subquery (below), but as i have it, it doesnt work. error returned is "Type mismatch". Is there anyway to pass a recordset to an SQL query? I cant use a typical subquery because the the data is from different servers!<br />-----<br />Set rs2 = Server.CreateObject("ADODB.Recordset")<br />Set rs = Server.CreateObject("ADODB.Recordset")<br /><br />sql2="select nCompanyID from company_online, online where Online_Name like '%" &query& "%' and company_online.sOnlineID=online.online_ID"<br />rs2.Open sql2, Application("LDS_DB_CONN"), adOpenForwardOnly, adLockReadOnly<br /> <br />sql="select name, sites.SiteID from Sites where CompanyID in " & rs2<br />rs.Open sql, Application("DB_CONN"), adOpenForwardOnly, adLockReadOnly<br />-----
|