Want to display recordset from MySQL
am 02.05.2006 06:00:43 von Chris WucariSemakanPelanggan.asp
<%
strODBC = "Driver={MySQL};" & _
"Server=localhost;" & _
"Database=sistemkewangan;" & _
"Uid=root;" & _
"Pwd=;"
%>
<%
nama = request.form("semakNamaPel")
resit = request.form("semakResitPel")
%>
<%
set rst = Server.CreateObject("ADODB.Connection")
rst.open strODBC
sql = "SELECT pelNama, pelDate, pelStat, pelSeb, pelResit, pelPTerima,
pelTerima from b_pelanggan WHERE pelNama = '" & nama & "' AND pelResit =
'" & resit & "'"
Set rsVI = rst.Execute(sql)
if rsVI.eof then
response.write ""
Else
pelNama = rsVI("pelNama")
pelDate = rsVI("pelDate")
pelResit = rsVI("pelResit")
pelPTerima = rsVI("pelPTerima")
pelTerima = rsVI("pelTerima")
end if
%>
face="Arial, Helvetica, sans-serif">NAMA |
face="Arial, Helvetica, sans-serif">NO.RESIT |
face="Arial, Helvetica, sans-serif">TARIKH |
face="Arial, Helvetica, sans-serif">AMAUN PERLU DIBAYAR |
face="Arial, Helvetica, sans-serif">AMAUN TELAH DIBAYAR |
<%=rsVI("pelNama")%> |
face="Arial, Helvetica, sans-serif"><%=rsVI("pelResit")%> |
face="Arial, Helvetica, sans-serif"><%=rsVI("pelDate")%> |
face="Arial, Helvetica, sans-serif"><%=rsVI("pelPTerima")%> |
face="Arial, Helvetica, sans-serif"><%=rsVI("pelTerima")%> |
<%
Set rsVI = Nothing
Set rst = Nothing
%>
JAVASCRIPT
function cari(){
nama = document.semakPelForm.semakNamaPel.value;
resit = document.semakPelForm.semakResitPel.value;
if ( nama =="" || resit =="")
alert(" !!Nama Syarikat dan No.Resit tidak boleh kosong!! ");
else
top.location.href("cariSemakanPelanggan.asp")
}
Javascript only response when i click button search and there was no
response when i filter all textbox and go to this ASP page.
*** Sent via Developersdex http://www.developersdex.com ***