hello friends
given below is a code to update a table in a database in a theatre ticket reservaton.
but this code does not work. it will show loading for long but the database i s updated.
but theprogress bar shows in progess. whatever after this code does not works.
code............................................
fname="../db/ajantha.mdb"
Set connObj = Server.CreateObject("ADODB.Connection")
connString="DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath(fname)
connObj.Open connString
'set rs=Server.CreateObject("ADODB.Recordset")
i=Request.Form("i") ' i is the no of records passed from previous page.
j=1
while j<i ' this loop loops till the no ofrecords is equivalent to the no of records
select case j
case 1: ' inserting first rec
strCommand="update trate set classid="&Request.Form("classid1")&",classname='"&Request.Form("classname1")&"',classrate="&Request.Form("classrate1")&" where classid="&Request.Form("classid1")
connObj.execute(strCommand)
case 2: 'inserting2nd record
strCommand="update trate set classid="&Request.Form("classid2")&",classname='"&Request.Form("classname2")&"',classrate="&Request.Form("classrate2")&" where classid="&Request.Form("classid2")
connObj.execute(strCommand)
case 3:
strCommand="update trate set classid="&Request.Form("classid3")&",classname='"&Request.Form("classname3")&"',classrate="&Request.Form("classrate3")&" where classid="&Request.Form("classid3")
connObj.execute(strCommand)
case 4:
strCommand="update trate set classid="&Request.Form("classid4")&",classname='"&Request.Form("classname4")&"',classrate="&Request.Form("classrate4")&" where classid="&Request.Form("classid4")
connObj.execute(strCommand)
end select
j=j+1
wend
please help me from thisproblem
thank u
anish





Bookmarks