hi, sorry for the late reply, i was out of the office.
i do not have any kind of errors when running the page but when i check the database i do not find records for locationid
in the begining of the page i declare my variables:
dim locationid
i have a sub:
sub Addlocation()
xmlReq = "http://tools.locatienet.com/xml.1/finder/Addlocation.asp"
xmlReq = xmlReq & "&locationname=" & request.form("Naam")
xmlReq = xmlReq & "&street=" & request.form("Straatnaam")
xmlReq = xmlReq & "&housenr=" & request.form("Huisnummer")
xmlReq = xmlReq & "&postcode=" & request.form("Postcode")
xmlReq = xmlReq & "&city=" & request.form("City")
xmlReq = xmlReq & "&phone=" & request.form("Telefoon")
xmlReq = xmlReq & "&fax=" & request.form("Fax")
xmlReq = xmlReq & "&internet=" & request.form("Website")
xmlReq = xmlReq & "&email=" & request.form("sEmail")
xmlReq = xmlReq & "&memo=" & request.form("Memo")
xmlReq = xmlReq & "&properties=" & request.form("Eigenschappen")
set xmlObj = getXMLDocument(xmlReq)
set colLocation = xmlObj.getElementsByTagName("location")
Set firstLocation = colLocation.Item(0)
locationid = firstLocation.getAttribute("id")
if xmlObj is Nothing or Not IsObject(xmlObj) then
exit sub
end if
end sub
and at the end of the class i have a function:
function Savedata()
lSQL = " INSERT INTO tblLocations "&_
" (Location_id, "&_
" locationname, "&_
" street, "&_
" housenr, "&_
" postcode, "&_
" city, "&_
" phone, "&_
" fax, "&_
" email, "&_
" internet, "&_
" properties, "&_
" X, "&_
" Y, "&_
" marker_id, "&_
" status, "&_
" Publish, "&_
" RefID, "&_
" Memo, "&_
" TimeStamp, "&_
" UserStamp) "&_
" VALUES "&_
" ('" &objDB.cv(locationid) &"'," &_
" '" &objDB.cv(Naam) &"'," &_
" '" &objDB.cv(Straatnaam) &"'," &_
" '" &objDB.cv(Huisnummer) &"'," &_
" '" &objDB.cv(Postcode) &"'," &_
" '" &objDB.cv(City) &"'," &_
" '" &objDB.cv(Telefoon) &"'," &_
" '" &objDB.cv(Fax) &"'," &_
" '" &objDB.cv(sEmail) &"'," &_
" '" &objDB.cv(Website) &"'," &_
" '" &objDB.cv(Eigenschappen) &"'," &_
" '" &objDB.cv(X) &"'," &_
" '" &objDB.cv(Y) &"'," &_
" '" &objDB.cv(Marker) &"'," &_
" '" &objDB.cv(status) &"'," &_
" '" &objDB.cv(Publish) &"'," &_
" '" &objDB.cv(RefID) &"'," &_
" '" &objDB.cv(Memo) &"'," &_
" '" &objDB.cv(now()) &"'," &_
" '" &objDB.cv(Session("UserID")) &"')"
objDB.insert(lSQL)
end function
i hope you can help me with this. i hope i can declare it globally so i can use it in the form as much as i like.
thanks
|