Hi there
I have a few lines of code that I would like to ammend but have been unsuccessful in doing so. I have posted in a few other forums with no luck, hopefully somebody here can help me out. I have a delete statement which I have been asked to change to an update statement instead. The delete statement has arrays hence the difficulty
Code below:
ConnectionOpen
DBConn.BeginTrans
'On Error Resume Next
'DELETE data
strSQL = "DELETE tblAvailable WHERE "
strSQL = strSQL + "(intResortID = " + Session("TypeID") + ")"
strSQL = strSQL + " AND (dtm BETWEEN CONVERT(DATETIME,'" + cstr(Year(dtmStart)) + "-" + cstr(Month(dtmStart)) + "-" + cstr(Day(dtmStart)) + "', 102)"
strSQL = strSQL + " AND CONVERT(DATETIME,'" + cstr(Year(dtmEnd)) + "-" + cstr(Month(dtmEnd)) + "-" + cstr(Day(dtmEnd)) + "', 102))"
'Add code to only delete out room types contained in the spreadsheet
Dim i
strSQL = strSQL & "AND (strRoomType='" & strRooms(0) & "'"
For i = 1 to m_Rooms
strSQL = strSQL & " OR strRoomType='" & strRooms(i) & "'"
next
strSQL = strSQL & ")"
'Response.Write strSQL
DBConn.Execute strSQL
Instead of deleteing I want my code to be ammended to set curprice = curPrice(intCurrentData)
Hopefully someone has an answer for me
Thanks