 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 31st, 2004, 12:41 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
getrows method-urgent?????
Hi,
i need to get value say empActiveNumber from SQL db,after retriving this record again i have to loop through the DB2 DB to check for the particular empactive number and get the details from db2.
For this whether can i use getrows method of recordset,does the size matters for that???..instead of retriving value from SQL and with that value i am again loopin the DB2.
please gimme suggestion how to proceed with that.
|
|

August 31st, 2004, 02:47 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
For this,
You retrieve the empActiveNumber from SQLDB and store in a string variable seperated by commas.
Next stage,
Issue another SQL statement using SQL IN operator to retrieve the details from the DB2 DB.
If you use for loop, there is a lot of burden on the database. If you retrieve values from the SQL DB are more, you must open the recordset that many no of times(with DB2 DB).
|
|

August 31st, 2004, 07:52 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi rajani,
After retriving records from SQL dB i need to check for each record that gives differen values...
|
|

August 31st, 2004, 08:52 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
hello,
i didnt get you. I thought that you have one-to-many/1-1 relationship b/w SQLDB and DB2 DB. What do you mean by check different values?
|
|

August 31st, 2004, 11:33 PM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
DB2 may have multiple records for sing active number so i cant use in operater
IN operater is like "or",It will retrive for all the values given values in the IN
|
|

September 1st, 2004, 03:29 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Then,
You can proceed with For...Loop
But, it will be slow if the SQL DB retrieves more numbers.
In the first post you said that you want to retrieve further info from DB2 DB from the values retrieving thru SQL DB. I thought that you def'ly have records in the DB2 DB and you want all the records corresponding to SQL DB values. Then using IN operator is best.
Eventhough its like OR but it satisfies your condition know.
You give ORDER BY clause.
|
|

September 1st, 2004, 03:36 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
after checking the DB2 with IN operator,i need to retrive the checked records from db2 and send mail for this again i have to go for loop....
|
|
 |