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

Database within database

Status
Not open for further replies.

greg1127

Technical User
Aug 5, 2003
8
0
0
AU
Hey guys,

At the moment i have an SQL database, that stores the names of the different organisational SQL databases in it. What i would like to know is if it is possible to open the first database, scan through the organisational names in it, add all these to a list of some sort, then procede to open these databases to retrieve some info from them?

I have tried using an array but have been told that it would not work like that.
If anone has some suggestions that would be great.
The following code is what i have now.
It always creates an error with opening the organisational database(s).

Dim OrgCustTotal', OrgCustTotalRS
SQL = "SELECT DISTINCT organisation FROM tbllogin WHERE loginType='blk'"
OrgCustTotal = 0
i = 0
OrgCustRS.Open SQL, objConn
Do While NOT OrgCustRS.EOF
OrgCustTotal = OrgCustTotal + 1
' response.write(OrgCustRS("organisation")&" ")
OrgCustRS.MoveNext
Loop
Response.write &quot;<br><br><br>&quot;
OrgCustRS.MoveFirst

dim OrgCust2RS,fld, j

SQL = &quot;SELECT noUses FROM '&quot;&(orgCustRS(&quot;organisation&quot;))&&quot;'&quot;
Set OrgCust2RS = objConn.Execute(SQL)
for each fld in OrgCustRS.fields

OrgTotalCust=0
OrgCustUses=0
j=0
Do While NOT OrgCust2RS.EOF
OrgTotalCust = OrgTotalCust + 1

OrgCustUses = j + OrgCust2RS(&quot;noUses&quot;)
j = OrgCustUses
OrgCust2RS.MoveNext
Loop

OrgCust2RS.Close
next
 
You have to make new conexions to those databases as well.


________
George, M
 
yup, where is the connections to the second databases?

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top