Wrox Programmer Forums
|
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
 
Old August 31st, 2004, 12:41 AM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old August 31st, 2004, 02:47 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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).


 
Old August 31st, 2004, 07:52 AM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi rajani,
After retriving records from SQL dB i need to check for each record that gives differen values...


 
Old August 31st, 2004, 08:52 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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?





 
Old August 31st, 2004, 11:33 PM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


 
Old September 1st, 2004, 03:29 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.



 
Old September 1st, 2004, 03:36 AM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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....






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call DLL Method in Javascritp? URGENT!!!!!! prabhakar123 Javascript 26 November 28th, 2011 07:06 AM
Urgent Help Needed : InvalidateControl Method vikasbhandari2 .NET Framework 3.5 0 June 11th, 2008 09:38 AM
CreateInstance method problem(urgent).. Srikanth_nd C# 0 June 16th, 2005 01:16 AM
Stackoverflow error in recursive method (URGENT... sangi Java Espanol 0 March 27th, 2005 05:53 AM
Grouping XML by Muenchian Method - Urgent :-( xrow XSLT 5 September 28th, 2004 04:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.