bip_to
New member
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id='.
/bioskop/pesan.asp, line 13
nih script ASP nya errornya di line yang warna merah :
<%
Set con = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
con.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ= D:\Inetpub\wwwroot\bioskop\database.mdb;"
nama = replace(request.QueryString("nama"),"+","")
alamat = replace(request.QueryString("alamat"),"+","")
noktp = request.QueryString("noktp")
jumlah = request.QueryString("jumlah")
jadwal = request.QueryString("jadwal")
tanggal = request.QueryString("tanggal")
rs.open "select * from jadwal where id=" & jadwal, con
harga = rs("harga")
kapasitas = rs("kapasitas")
rs.close
biaya = harga * jumlah
rs.open "select sum(jumlah) as total from pesan where tanggal='" & tanggal & "' and jadwal='" & jadwal & "'", con
if not rs.eof then
totalkursi = rs("total")
else
totalkursi = 0
end if
rs.close
if (totalkursi+jumlah>kapasitas) then
response.write "penuh"
else
con.execute "insert into pesan(nama,alamat,noktp,jadwal,jumlah,status) values('" & nama & "','" & alamat & "','" & noktp & "'," & jadwal & "," & jumlah & ",1)"
rs.open "select * from pesan where noktp='" & noktp & "' and jadwal=" & jadwal & " order by id desc", con
if not rs.eof then
transaksi = rs("id")
//hapus tanda { dan } di awal dan akhir id transaksi
status = "ok"
transaksi = mid(transaksi,2,len(transaksi)-2)
response.write "ok|" & transaksi & "|" & biaya
else
response.write "gagal"
end if
end if
rs.close
set rs = nothing
con.close
set con = nothing
%>
di tunggu reply nya dari teman teman
YM : bip_to
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id='.
/bioskop/pesan.asp, line 13
nih script ASP nya errornya di line yang warna merah :
<%
Set con = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
con.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ= D:\Inetpub\wwwroot\bioskop\database.mdb;"
nama = replace(request.QueryString("nama"),"+","")
alamat = replace(request.QueryString("alamat"),"+","")
noktp = request.QueryString("noktp")
jumlah = request.QueryString("jumlah")
jadwal = request.QueryString("jadwal")
tanggal = request.QueryString("tanggal")
rs.open "select * from jadwal where id=" & jadwal, con
harga = rs("harga")
kapasitas = rs("kapasitas")
rs.close
biaya = harga * jumlah
rs.open "select sum(jumlah) as total from pesan where tanggal='" & tanggal & "' and jadwal='" & jadwal & "'", con
if not rs.eof then
totalkursi = rs("total")
else
totalkursi = 0
end if
rs.close
if (totalkursi+jumlah>kapasitas) then
response.write "penuh"
else
con.execute "insert into pesan(nama,alamat,noktp,jadwal,jumlah,status) values('" & nama & "','" & alamat & "','" & noktp & "'," & jadwal & "," & jumlah & ",1)"
rs.open "select * from pesan where noktp='" & noktp & "' and jadwal=" & jadwal & " order by id desc", con
if not rs.eof then
transaksi = rs("id")
//hapus tanda { dan } di awal dan akhir id transaksi
status = "ok"
transaksi = mid(transaksi,2,len(transaksi)-2)
response.write "ok|" & transaksi & "|" & biaya
else
response.write "gagal"
end if
end if
rs.close
set rs = nothing
con.close
set con = nothing
%>
di tunggu reply nya dari teman teman
YM : bip_to