# ASP Code not working

**URL:** <https://forum.kirupa.com/t/asp-code-not-working/109608>\
**Category:** Uncategorized\
**Created:** [May 7, 2004, 3:30am UTC](https://forum.kirupa.com/t/asp-code-not-working/109608 "2004-05-07T03:30:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wish7](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wish7](https://forum.kirupa.com/u/wish7)\
**Post date:** [May 7, 2004, 3:30am UTC](https://forum.kirupa.com/t/asp-code-not-working/109608/1 "2004-05-07T03:30:30Z")

</div>

Anyone have an idea why this is not loading info into database?

Here is the code:

\<%@LANGUAGE=“VBSCRIPT”%\>

\<!–#include file=“Connections/guestbook.asp” --\>

\<%  
Dim guestform  
Dim guestform\_numRows

Set guestform = Server.CreateObject(“ADODB.Recordset”)  
guestform.ActiveConnection = MM\_guestbook\_STRING  
guestform.Source = “SELECT \* FROM Guestbook ORDER BY LastName”  
guestform.CursorType = 0  
guestform.CursorLocation = 2  
guestform.LockType = 1  
guestform.Open()

guestform\_numRows = 0

strFirst = Request.Form(“fName”)  
strLast = Request.Form(“lName”)  
strEmail = Request.Form(“email”)  
strComments = Request.Form(“comments”)

SQL = “INSERT INTO Guestbook (FirstName, LastName, Email, Comments) VALUES (’”&strFirst&"’,’"&strLast&"’,’"&strEmail&"’,’"&strComments&"’)"  
MyPath=Server.MapPath("…/db/gbook.mdb")  
Set conn = Server.CreateObject(“ADODB.Connection”)  
guestform.Open “Driver={Microsoft Access Driver (\*.mdb)};” & \_  
“DBQ=” & MyPath  
Response.Write(SQL)  
conn.Execute(SQL)  
%\>  
\<%  
guestform.Close()  
Set guestform = Nothing  
%\>
