Sunday 2 December 2007 photo 1/1
|
har trök, så gjorde en avatar innan jag skulle sova :P
Annons
Anonymous
Wed 5 Dec 2007 09:48
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include file="includes/adovbs.inc" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
If Request.QueryString("val") = "visa" Then %>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=c:\inetpub\www\FTP\henrik-id05\data\mindatabas.mdb"
Set RecSetFrukter = Server.CreateObject("ADODB.Recordset")
Frukter = "SELECT * FROM frukter"
RecSetFrukter.CursorType = 1
RecSetFrukter.LockType = 3
RecSetFrukter.Open Frukter, Connect
%>
<% Do Until RecSetFrukter.EOF %>
Frukt: <% =RecSetFrukter("namn") %>
Vikt: <% =RecSetFrukter("vikt") %>
<a href="genomgang_071126.asp?val=tabort&namn=<% =RecSetFrukter("namn") %>Ta bort</a>
<a href="genomgang_071126.asp?val=andra&namn=<% =RecSetFrukter("namn") %>Andra</a>
<%
If RecSetFrukter.EOF Then
Exit Do
Else
RecSetFrukter.MoveNext
End If
Loop
RecSetFrukter.Close
Set RecSetFrukter = Nothing
Connect.Close
Set Connect = Nothing
%>
<%
ElseIf Request.QueryString("val") = "lagg_till" Then %>
<form method="post" action="genomgang_071126.asp?val=spara">
<input type="text" name="frukt">
<input type="text" name="vikt">
<input type="submit" value="Spara">
</form>
<%
ElseIf Request.QueryString("val") = "spara" Then %>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=c:\inetpub\www\FTP\henrik-id05\data\mindatabas.mdb"
Set RecSetFrukter = Server.CreateObject("ADODB.Recordset")
Frukter = "SELECT * FROM frukter"
RecSetFrukter.CursorType = 1
RecSetFrukter.LockType = 3
RecSetFrukter.Open Frukter, Connect
RecSetFrukter.AddNew
RecSetFrukter("namn") = Request.Form("frukt")
RecSetFrukter("vikt") = Request.Form("vikt")
RecSetFrukter.UpDate
RecSetFrukter.Close
Set RecSetFrukter = Nothing
Connect.Close
Set Connect = Nothing
Response.ReDirect("genomgang_071126.asp?val=visa")
%>
<%
End If %>
</body>
</html>
<!-- #include file="includes/adovbs.inc" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
If Request.QueryString("val") = "visa" Then %>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=c:\inetpub\www\FTP\henrik-id05\data\mindatabas.mdb"
Set RecSetFrukter = Server.CreateObject("ADODB.Recordset")
Frukter = "SELECT * FROM frukter"
RecSetFrukter.CursorType = 1
RecSetFrukter.LockType = 3
RecSetFrukter.Open Frukter, Connect
%>
<% Do Until RecSetFrukter.EOF %>
Frukt: <% =RecSetFrukter("namn") %>
Vikt: <% =RecSetFrukter("vikt") %>
<a href="genomgang_071126.asp?val=tabort&namn=<% =RecSetFrukter("namn") %>Ta bort</a>
<a href="genomgang_071126.asp?val=andra&namn=<% =RecSetFrukter("namn") %>Andra</a>
<%
If RecSetFrukter.EOF Then
Exit Do
Else
RecSetFrukter.MoveNext
End If
Loop
RecSetFrukter.Close
Set RecSetFrukter = Nothing
Connect.Close
Set Connect = Nothing
%>
<%
ElseIf Request.QueryString("val") = "lagg_till" Then %>
<form method="post" action="genomgang_071126.asp?val=spara">
<input type="text" name="frukt">
<input type="text" name="vikt">
<input type="submit" value="Spara">
</form>
<%
ElseIf Request.QueryString("val") = "spara" Then %>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=c:\inetpub\www\FTP\henrik-id05\data\mindatabas.mdb"
Set RecSetFrukter = Server.CreateObject("ADODB.Recordset")
Frukter = "SELECT * FROM frukter"
RecSetFrukter.CursorType = 1
RecSetFrukter.LockType = 3
RecSetFrukter.Open Frukter, Connect
RecSetFrukter.AddNew
RecSetFrukter("namn") = Request.Form("frukt")
RecSetFrukter("vikt") = Request.Form("vikt")
RecSetFrukter.UpDate
RecSetFrukter.Close
Set RecSetFrukter = Nothing
Connect.Close
Set Connect = Nothing
Response.ReDirect("genomgang_071126.asp?val=visa")
%>
<%
End If %>
</body>
</html>
2 comments on this photo
Directlink:
http://dayviews.com/nordinho/128618571/