Click to See Complete Forum and Search --> : Asp


pankajg99
04-08-2008, 10:05 AM
1) Create a table SpaceMaster which will hold have the following columns
a) SpaceID (AutoIncremented Field)
b) Floor Plan ID
c) BedroomCount
d) BathroomCount
e) DepositAmount
f) DepositType
g) SpaceArea
h) MinRent
g) MaxRent
h) SpaceImage
2) Read the data from the xml and import the content into the table. The column mapping would be

FloorPlanID = PhysicalProperty\Property\FloorPlan
BedroomCount = PhysicalProperty\Property\FloorPlan\RoomType = Bedroom\Count
BathroomCount = PhysicalProperty\Property\FloorPlan\RoomType = Bathroom\Count
DepositAmount = PhysicalProperty\Property\FloorPlan\Deposit type=secirity \Amount
DepositType = PhysicalProperty\Property\FloorPlan\Deposit type=secirity \Description
SpaceArea = PhysicalProperty\Property\FloorPlan\SqaureFeet
MinRent=PhysicalProperty\Property\FloorPlan\EffectiveRent min attribute
MaxRent = PhysicalProperty\Property\FloorPlan\EffectiveRent max attribute
SpaceImage = PhysicalProperty\Property\FloorPlan\Image\CDATA

3) All data under PhysicalProperty\Property\FloorPlan\Amenities should be inserted into a Details table. You can deisgn the table and insert the data.

4) In the next asp page. write a code to read data from this Spacemaster and details table and display the contents. Each Floor Plan information should come in a box.

This is my problem for which i write code which i am sending you. please check the code and send me complete solution because i am new

sir it's very very urgent please send me today.

Thanks in advance.

*****************CODE*****************************
<%

Set con = Server.CreateObject("ADODB.Connection")
con.Open= ("Provider=SQLOLEDB;Data Source=NITESH;Initial Catalog=SpaceM; UId=sa; Pwd=;")

Dim xmldoc
Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")

If (xmldoc.childNodes.length = 0) Then
Set root = xmldoc.createNode("element", "Hi-Tech", "")
xmldoc.appendChild (root)

sql ="SELECT * FROM SpaceMaster"
Set rs = con.Execute(sql)
rs.MoveFirst

Do While Not rs.EOF

Set inode = xmldoc.createNode("element", "SID", "")
inode.Text = rs.fields(0) & " " & rs.fields(1)
xmldoc.documentElement.appendChild (inode)
rs.movenext

Loop
Set rs = Nothing
End If

xmldoc.save server.mappath("C:\\Inetpub\wwwroot\pankaj\saved.xml")
xmldoc.load server.MapPath("C:\\Inetpub\wwwroot\pankaj\saved.xml")

sourceFile = Server.MapPath("C:\\Inetpub\wwwroot\pankaj\saved.xml")
styleFile = Server.MapPath("C:\\Inetpub\wwwroot\pankaj\saved.xml")

set source = Server.CreateObject("Microsoft.XMLDOM")
source.async = false
source.load(sourceFile)
set style = Server.CreateObject("Microsoft.XMLDOM")
style.async = false
style.load(styleFile)
Response.Write source.transformNode(style)
%>

DmitriF
04-11-2008, 02:48 PM
This is my problem for which i write code which i am sending you. please check the code and send me complete solution because i am new

sir it's very very urgent please send me today


Dude no, doesn't matter whether you are new or old, if you need free programming done for you - it wont happen - instead go hire someone. Forums are here to HELP you with certain parts in order to further your understanding, not to program for you.