hai...everybody....
my problem is, i want to do 2 process in one page...actually i copy this coding from my friend..but it cannot work on my page.it always give me error : data type mismatch.
below are the coding:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim aduan
Dim id
Dim pengguna
Dim code
Dim sbb
Dim lok
Dim blok
Dim ting
Dim bil
Dim tarikh
Dim arah
Dim bhn
Dim lapor
Dim stat
Dim upah
Dim kosbhn
Dim runding
Dim jumkos
Dim sq
Dim db
Dim sq2
Dim sq3
Dim rs
aduan=request.form("textfield2")
pengguna=request.form("textfield3")
code=request.form("textfield4")
sbb=request.form("textfield5")
lok=request.form("textfield6")
blok=request.form("textfield7")
ting=request.form("textfield8")
bil=request.form("textfield9")
tarikh=request.form("textfield10")
arah=request.form("textfield11")
bhn=request.form("textfield12")
lapor=request.form("textfield13")
stat=request.form("textfield14")
upah=request.form("textfield15")
kosbhn=request.form("textfield16")
runding=request.form("textfield17")
jumkos=request.form("textfield18")
set db = Server.CreateObject ("ADODB.Connection")
db.Open "sambung"
sq= "INSERT INTO tb_arkib(id_aduan, id_user, kod_kerosakan, sebab_kerosakan, lokasi, blok, tingkat, no_bilik,tarikhmasa, arahan, bhn_ganti,laporan,status_id, upah,kosbhn_ganti,perundingan, jumlah_kos) VALUES ('" & aduan & "', '" & pengguna & "', '" & code & "', '" & sbb & "', '" & lok & "', '" & blok & "', '" & ting & "', '" & bil & "', '" & tarikh & "', '" & arah & "', '" & bhn & "', '" & lapor & "', '" & stat & "', '" & upah & "', '" & kosbhn & "', '" & runding & "', '" & jumkos & "')"
'sq="INSERT INTO tb_arkib FROM tb_aduan a WHERE id_aduan='" & id & "'"
set rs = db.execute(sq)
'sq="SELECT * FROM tb_aduan"
'set rs=db.execute(sq)
'do while NOT rs.EOF
sq2= " DELETE * FROM tb_aduan WHERE id_aduan = '" & aduan & "' "
set rs = db.execute(sq2)
'rs.movenext
'loop
'rs.close
db.close
Response.Redirect ("timakasih.asp")
%>
</body>
</html>
the format of id_aduan is actually autonumber. i think the error is something to do with the id_aduan. can somebody help me.
this is the last page before i can present it to my bos.....
i really need help