hi, i have a asp page that returns in a recordset "rs" a sq command (SELECT COD , NOME FROM T_XML FOR XML RAW ) in a sql server, so the result i get in the recorset is like this: <row COD="1" NOME="Aline"/><row COD="2" NOME="Vivian"/>.... i was wondering how i can get this entire string and pass it to a nice datagrid in flash? thanks.
Hi, Use FOR XML AUTO, ELEMENT or ATTRIBUTE centric, depending what you like. Here's the code: SELECT ISNULL(listing_iOrder,' ') AS "order", ISNULL(listing_sAddress,' ') AS "address", ISNULL(listing_sCity,' ') AS "city", ISNULL(listing_sZip,' ') AS "zip", ISNULL(listing_iPrice,0) AS "price", ISNULL(listing_sHeadline,' ') AS "headline", ISNULL(listing_sDesc,' ') AS "description", ISNULL(listing_sVirtualTourUrl,' ') AS "virtualtour", ISNULL(listing_sThumbImgUrl,' ') AS "thumbnail", ISNULL(listing_sImgUrl1,' ') AS "image1", ISNULL(listing_sImgUrl2,' ') AS "image2", ISNULL(listing_sImgUrl3,' ') AS "image3", ISNULL(listing_sImgUrl4,' ') AS "image4", ISNULL(listing_sImgUrl5,' ') AS "image5", ISNULL(listing_sImgUrl6,' ') AS "image6", ISNULL(listing_sImgUrl7,' ') AS "image7", ISNULL(listing_sImgUrl8,' ') AS "image8", ISNULL(listing_sImgUrl9,' ') AS "image9", ISNULL(listing_sImgUrl10,' ') AS "image10", ISNULL(listing_sImgUrl11,' ') AS "image11", ISNULL(listing_sImgUrl12,' ') AS "image12", ISNULL(listing_sPdfUrl,' ') AS "pdf", ISNULL(listing_sReferrer,' ') AS "referrer", ISNULL(t_state.state_sDesc,' ') AS "state", ISNULL(t_category.category_sName,' ') AS "category", ISNULL(t_status.status_sName,' ') AS "status" FROM t_listing inner join t_category on t_category.category_id = t_listing.category_id inner join t_state on t_state.state_id = t_listing.state_id inner join t_status on t_status.status_id = t_listing.status_id WHERE (t_listing.client_id = @client_id) ORDER BY listing_iPrice desc FOR XML AUTO, ELEMENTS
hi knoxx, i'm a little confused here, when the sql command runs in a asp page, the results (my xml structure retruned from the database) are stored in a recodset like : myRs = conn.execute(sql) this way i will have in myRs the xml structure, correct me if i'm wrong here. so how can i get the entire xml string from myRS to pass to a variable in asp, so that i can pass it again to flash like: myASPvar = myRS.result() <- associate all the xml string to a asp var. response.write "myFlashVar=" & myASPvar <- pass it again to flash OR i'm wondering if i use a xmlConnector to connet to the asp page, then this page returns (in some unknown way) the xml structure directly to the xmlConnector in flash... this could be an idea too... thanks!
Don't see what you're looking for? Try a search.
|