Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Creating an Array from a Recordset


Message #1 by "Reginald Dawson" <rdawson@w...> on Tue, 19 Dec 2000 16:05:33 -0000
Hello all,



I need to create a 2-dimensional array from a recordset which may contain

some null fields (columns).  Should I use the GetRows() method to extract

these values into an array?  Or, should I extract all of the values which

are not null and then create the array?



My main concern is server resources and the fact that some fields are

null.  Either way, a short sample of how do this would also be

appreciated!



Thanks,



Reginald Dawson



--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Dallas Martin" <dmartin@z...> on Tue, 19 Dec 2000 20:30:01 -0500
Do you want to return the entire row if a field contains a NULL value?



If not, then add a NULL filter to your SELECT query. ie.



SELECT field1, field2 FROM table1 WHERE field2 IS NOT NULL



This will return only rows with non-null values in both fields.



DM





----- Original Message -----

From: "Reginald Dawson" <rdawson@w...>

To: "ASP Databases" <asp_databases@p...>

Sent: Tuesday, December 19, 2000 11:05 AM

Subject: [asp_databases] Creating an Array from a Recordset





> Hello all,

>

> I need to create a 2-dimensional array from a recordset which may contain

> some null fields (columns).  Should I use the GetRows() method to extract

> these values into an array?  Or, should I extract all of the values which

> are not null and then create the array?

>

> My main concern is server resources and the fact that some fields are

> null.  Either way, a short sample of how do this would also be

> appreciated!

>

> Thanks,

>

> Reginald Dawson





--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by "Frankie, Loh Teck Seng" <lohts@p...> on Wed, 20 Dec 2000 10:11:01 +0800
GetRows will derive the output in array format, but the site effect might

the performance.



Thanks.



-----Original Message-----

From: Reginald Dawson [mailto:rdawson@w...]

Sent: 20 December 2000 00:06

To: ASP Databases

Subject: [asp_databases] Creating an Array from a Recordset





Hello all,



I need to create a 2-dimensional array from a recordset which may contain

some null fields (columns).  Should I use the GetRows() method to extract

these values into an array?  Or, should I extract all of the values which

are not null and then create the array?



My main concern is server resources and the fact that some fields are

null.  Either way, a short sample of how do this would also be

appreciated!



Thanks,



Reginald Dawson





--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #4 by "Reginald Dawson" <rdawson@w...> on Wed, 20 Dec 2000 16:33:22 -0000
Thanks for the help.  I will use both of your suggestions and create the

array not from the GetRows() method but instead, manually from selecting

field values that are NOT NULL.



Thanks a bunch!



Reginald Dawson



---

FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS

IN YOUR INBOX!

Get the latest and best HTML, XML, and JavaScript tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb's

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #5 by "Ken Schaefer" <ken@a...> on Thu, 21 Dec 2000 11:04:06 +1100
You should be creating a recordset by selecting fields that are not NULL,

then using getRows() to get the array...so a combination of both methods is

what you want.



Cheers

Ken



----- Original Message -----

From: "Reginald Dawson" <rdawson@w...>

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, December 21, 2000 3:33 AM

Subject: [asp_databases] RE: Creating an Array from a Recordset





> Thanks for the help.  I will use both of your suggestions and create the

> array not from the GetRows() method but instead, manually from selecting

> field values that are NOT NULL.

>

> Thanks a bunch!

>

> Reginald Dawson







--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index