Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: getrows() with datashaping


Message #1 by Floyd Hunag <flloid@p...> on Thu, 15 Feb 2001 21:08:58 +0800
I always prefer to use getrows() to fetch records from recordset. Recently in a project I use
MSDataShape OlEDB provider to access data, and when I use getrows() to fetch all records as usual, I don't have any idea how can I
have access to childrecordset.

Anyone can give me some advice? Thanks in advance.



From Ed.

Message #2 by Louise Greally <lgreally@c...> on Thu, 15 Feb 2001 14:10:48 -0000
eg



StrSQLshape = "SHAPE {SELECT x, y FROM table1 }  AS Parent APPEND ({SELECT

x,z FROM table2}  AS Child RELATE ''x' to 'x') " 

set ParentRS = conn.execute(StrSQLshape)



' process as follows

response.write ParentRS("x")	

response.write ParentRS("y")

	

set ChildRS = ParentRS("Child").value 	' dont have to use child as the name

in sql statement, can use any name, but the AS clause is the means in which

you access the 					'child RS 

response.write ChildRS("z")

' perhaps if you wanted you could assign an array to childRS.getrows , not

sure havent done that before



anyway, the above should work, hope it helps



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

From: Floyd Hunag [mailto:flloid@p...]

Sent: 15 February 2001 13:09

To: ASP Databases

Subject: [asp_databases] getrows() with datashaping





I always prefer to use getrows() to fetch records from recordset. Recently

in a project I use MSDataShape OlEDB provider to access data, and when I use

getrows() to fetch all records as usual, I don't have any idea how can I

have access to childrecordset.

Anyone can give me some advice? Thanks in advance.



From Ed.

Message #3 by Floyd Hunag <flloid@p...> on Fri, 16 Feb 2001 19:50:07 +0800
Thanks,Louise

I really appreciate your reply. But what I want to know is how to fetch child recodsets when using getrows() to fetch all records
first. Anyone has some good suggestions? Thanks in advance!



From Ed

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

From: "Louise Greally" <lgreally@c...>

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

Sent: Thursday, February 15, 2001 10:10 PM

Subject: [asp_databases] RE: getrows() with datashaping





> eg

> 

> StrSQLshape = "SHAPE {SELECT x, y FROM table1 }  AS Parent APPEND ({SELECT

> x,z FROM table2}  AS Child RELATE ''x' to 'x') " 

> set ParentRS = conn.execute(StrSQLshape)

> 

> ' process as follows

> response.write ParentRS("x") 

> response.write ParentRS("y")

> 

> set ChildRS = ParentRS("Child").value ' dont have to use child as the name

> in sql statement, can use any name, but the AS clause is the means in which

> you access the 'child RS 

> response.write ChildRS("z")

> ' perhaps if you wanted you could assign an array to childRS.getrows , not

> sure havent done that before

> 

> anyway, the above should work, hope it helps

> 

> -----Original Message-----

> From: Floyd Hunag [mailto:flloid@p...]

> Sent: 15 February 2001 13:09

> To: ASP Databases

> Subject: [asp_databases] getrows() with datashaping

> 

> 

> I always prefer to use getrows() to fetch records from recordset. Recently

> in a project I use MSDataShape OlEDB provider to access data, and when I use

> getrows() to fetch all records as usual, I don't have any idea how can I

> have access to childrecordset.

> Anyone can give me some advice? Thanks in advance.

> 

> From Ed.

> 

  Return to Index