funkyhotspot
Gebruiker
- Lid geworden
- 20 mei 2004
- Berichten
- 14
Ik probeer een gegevens in een database in te voeren met asp, iemand enig idee waar de fout(en) zitten?
<%
dim strConn
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\bla\bla\db\funky.mdb"
dim adoCn
dim strSQL
if Request.QueryString("action") = "save" then
dim voornaam
dim achternaam
voornaam = Request.Form("voornaam")
achternaam = Request.Form("achternaam")
set adoCn = Server.CreateObject("ADODB.Connection")
adoCn.Open strConn
strSQL = "Insert Into tbl_klanten (voornaam,achternaam) Values ('','')"
adoCn.Execute strSQL
adoCn.Close
set adoCn = nothing
Response.Redirect "bedankt.htm"
end if
%>
<html>
<head>
<title>Vul alle velden volledig en correct</title>
</head>
<form name="funkprob.asp" method="post" action="funkprob.asp">
<input type="hidden" name="SECTION" value="user">
<h1>
<font face="Century Gothic" size="5" color="#FF0065">......</font></h1>
<h2>
<b><font face="Century Gothic" size="4">.......</font></b></h1>
<table class="regular" width="750" height="63"><tr>
<td class="field-description" height="22" width="245" background="filters/rfilter.gif">
<b><font face="Century Gothic">Voornaam</font></b></td>
<td height="22" width="495" background="filters/redfilter.gif">
<font face="Century Gothic"><b><input size="40" type="text" name="voornaam" maxlength="40" value="" ></b></font></td></tr>
<tr>
<td class="field-description" height="22" width="245">
<b><font face="Century Gothic">Achternaam</font></b></td>
<td height="22" width="495">
<font face="Century Gothic"><b><input size="40" type="text" name="achternaam" value="" ></b></font></td></tr>
<input type="submit" value="verstuur" action="save" >
</body>
</html>
<%
dim strConn
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\bla\bla\db\funky.mdb"
dim adoCn
dim strSQL
if Request.QueryString("action") = "save" then
dim voornaam
dim achternaam
voornaam = Request.Form("voornaam")
achternaam = Request.Form("achternaam")
set adoCn = Server.CreateObject("ADODB.Connection")
adoCn.Open strConn
strSQL = "Insert Into tbl_klanten (voornaam,achternaam) Values ('','')"
adoCn.Execute strSQL
adoCn.Close
set adoCn = nothing
Response.Redirect "bedankt.htm"
end if
%>
<html>
<head>
<title>Vul alle velden volledig en correct</title>
</head>
<form name="funkprob.asp" method="post" action="funkprob.asp">
<input type="hidden" name="SECTION" value="user">
<h1>
<font face="Century Gothic" size="5" color="#FF0065">......</font></h1>
<h2>
<b><font face="Century Gothic" size="4">.......</font></b></h1>
<table class="regular" width="750" height="63"><tr>
<td class="field-description" height="22" width="245" background="filters/rfilter.gif">
<b><font face="Century Gothic">Voornaam</font></b></td>
<td height="22" width="495" background="filters/redfilter.gif">
<font face="Century Gothic"><b><input size="40" type="text" name="voornaam" maxlength="40" value="" ></b></font></td></tr>
<tr>
<td class="field-description" height="22" width="245">
<b><font face="Century Gothic">Achternaam</font></b></td>
<td height="22" width="495">
<font face="Century Gothic"><b><input size="40" type="text" name="achternaam" value="" ></b></font></td></tr>
<input type="submit" value="verstuur" action="save" >
</body>
</html>
Laatst bewerkt: