Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Urgent:Please Help

I have written the code below. But somehow error occurs when I try to retrive the sum value from the database to the textbox.

sql = "select LAST_INSERT_ID()"
rse1.Open sql, conn

newId = rse1(0)

sql = "insert into dieHistory(dieHistoryId,dateToday,dieHistoryNo) values ('" & newId & "', '" & Form1.Label2 & "', '" & Form1.txtNo.Text & "')"
rse2.Open sql, conn

sql = "update userToolPartName set UserToolId = '', userToolCost = '" & txtCost1.Text & "' where dieHistoryId = Last_Insert_Id()"
rse3.Open sql, conn

sql = "update userToolPartName set UserToolId = '', userToolCost = '" & txtCost2.Text & "' where dieHistoryId = Last_Insert_Id()"
rse4.Open sql, conn

sql = "select sum(userToolCost) as TotCost from userToolPartName where dieHistoryId = Last_Insert_Id()"
rse5.Open sql, conn

txtTotCost.Text = rse5("TotCost")--> error occurs on thisline

can someone please help me solve the problem.. :(
[1060 byte] By [galgal5814] at [2007-11-11 7:46:15]
# 1 Re: Urgent:Please Help
Hey nemind I had detected the problem already. There is something wrong witht the database :)
galgal5814 at 2007-11-11 17:26:33 >