a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

A lil direction 'n' junk

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> A lil direction 'n' junk
Page: [1]
 
Suamere

 

Posts: 3
Joined: 1/6/2005
Status: offline

 
A lil direction 'n' junk - 1/6/2005 12:07:42   
Okay, so I'm making a web page...

And I'm like, "Oooh, Frontpage"

I'm used to programming my own code, but I like frontpage now.

So... How do I make an Access Database Web Form to create a New Record upon submission? I have this:
www.HyruleRP.com/field1.asp

As youc an see, you submit your information, and it doesn't post to the database, though it says it is doing so. I followed the DRW steps as far as right clicking the form area and making the text boxes correspond to the form colums for input... Why isn't it posting to the database?
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: A lil direction 'n' junk - 1/6/2005 12:13:19   
you need to post your asp code.. after you click reply, click the "code" box and paste your code in there

_____________________________

Dan

(in reply to Suamere)
Suamere

 

Posts: 3
Joined: 1/6/2005
Status: offline

 
RE: A lil direction 'n' junk - 1/6/2005 12:35:58   
Okay, so here is the code. Sorry I didn't post it...

(in reply to Suamere)
Suamere

 

Posts: 3
Joined: 1/6/2005
Status: offline

 
RE: A lil direction 'n' junk - 1/6/2005 12:37:15   

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
	Err.Clear

	Set fp_conn =  Server.CreateObject("ADODB.Connection")
	FP_DumpError strErrorUrl, "Cannot create connection"

	Set fp_rs = Server.CreateObject("ADODB.Recordset")
	FP_DumpError strErrorUrl, "Cannot create record set"

	fp_conn.Open Application("HRPDB_ConnectionString")
	FP_DumpError strErrorUrl, "Cannot open database"

	fp_rs.Open "Members", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
	FP_DumpError strErrorUrl, "Cannot open record set"

	fp_rs.AddNew
	FP_DumpError strErrorUrl, "Cannot add new record set to the database"
	Dim arFormFields0(2)
	Dim arFormDBFields0(2)
	Dim arFormValues0(2)

	arFormFields0(0) = "ScreenName"
	arFormDBFields0(0) = "Field2"
	arFormValues0(0) = Request("ScreenName")
	arFormFields0(1) = "CharacterName"
	arFormDBFields0(1) = "Field1"
	arFormValues0(1) = Request("CharacterName")

	FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

	If Request.ServerVariables("REMOTE_HOST") <> "" Then
		FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "Remote_computer_name"
	End If
	If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
		FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type"
	End If
	FP_SaveFieldToDB fp_rs, Now, "Timestamp"
	If Request.ServerVariables("REMOTE_USER") <> "" Then
		FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
	End If

	fp_rs.Update
	FP_DumpError strErrorUrl, "Cannot update the database"

	fp_rs.Close
	fp_conn.Close

	FP_FormConfirmation "text/html; charset=windows-1252",_
						"Form Confirmation",_
						"Thank you for submitting the following information:",_
						"field1.asp",_
						"Return to the form."

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Field1</title>
</head>

<body>

<table border="1">
  <thead>
    <tr>
      <td><b>Field1</b></td>
      <td><b>Field2</b></td>
    </tr>
  </thead>
  <tbody>
    <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Field1,Field2" s-columntypes="3,202,202" s-dataconnection="HRPDB" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="FALSE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Members" s-displaycolumns="Field1,Field2" s-criteria s-order s-sql="SELECT * FROM Members" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Members"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=2 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="HRPDB"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan --><tr>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Field1,Field2" s-column="Field1" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Field1<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Field1")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Field1,Field2" s-column="Field2" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Field2<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Field2")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
    </tr>
    <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan --></tbody>
</table>

<form method="POST" action="field1.asp" webbot-action="--WEBBOT-SELF--">
  <!--webbot bot="SaveDatabase" SuggestedExt="asp" U-ASP-Include-Url="_fpclass/fpdbform.inc" S-DataConnection="HRPDB" S-RecordSource="Members" U-Database-URL="fpdb/HRPDB.mdb" S-Builtin-Fields="REMOTE_HOST HTTP_USER_AGENT Timestamp REMOTE_USER" S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name" S-Form-Fields="ScreenName CharacterName" S-Form-DBFields="Field2 Field1" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="40548" endspan --><p>
  <input type="text" name="ScreenName" size="20" value="Type SN Here"></p>
  <p><input type="text" name="CharacterName" size="20" value="Type CN Here"></p>
  <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>

(in reply to Suamere)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> Microsoft FrontPage Help >> A lil direction 'n' junk
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts