Help please....global.asa and forms

E

Evan

Help! I need some help! Help! Oh, won't you please please help me?

I've been at this for hours. I have asp code below that is not working
correctly. Basicaly it is a script asking that my form pull the last record
from my database (located in fpdb/signup2004.mdb). I use this method to post
to a database and send a confirm email but it stopped working. I am positive
it has something to do with the schema.ini file as well. Can someone take a
look? Also, let me know what directories each file should sit in? The
global.asa file is in the root and the schema.ini is in the fpdb folder.
Thanks!! Would be very appreciative of any assistance!!

<%
'//////////////////////////////////////////////////////////
'// The first two lines of code are calling the connection
'// object for the text file that is stored in the
'// global.asa file.
'//////////////////////////////////////////////////////////


Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("text_ConnectionString")
'//////////////////////////////////////////////////////////
'// Next you create a record set object, execute the
'// database connection and a SQL query.
'//////////////////////////////////////////////////////////

Set RS = Conn.Execute ("SELECT * From fpdb/signup2004.mdb")


'//////////////////////////////////////////////////////////
'// You then use code to loop through the database and
'// select the last record entered.
'//////////////////////////////////////////////////////////

Dim iCnt
Do Until RS.EOF
iCnt = iCnt + 1
full_name = RS("full_name")
email = RS("email")
IM = RS("IM")
R1 = RS("R1")
Comments = RS("Comments")
RS.MoveNext
Loop
'//////////////////////////////////////////////////////////
'// Close the record set and the connection.
'//////////////////////////////////////////////////////////

RS.Close
Conn.Close
%>
 
A

Andrew Murray

global.asa contains your database connections. Nothing to do with sending
email.

I'd ask the author of the script.

This code contains nothing that sends the email (that I can identify).

What about the actual asp script that writes to the database? can you post
that code?

I'd go back through the instructions, and re-configure the script/form

global.asa should be (generally) in the root directory.
 
E

Evan

Thanks Andrew. Here is the code that goes to the database and everything
posts correctly. It then goes to the "confirm" page, which was the script I
originally proposed (that points to global.asa). It used to work. The
database entry would repopulate in another form using hidden values (by
pulling the last entry) and when the user hit confirm the email would send.
Really appreciate the help. It's driving me nuts.

<form METHOD="POST" action="--WEBBOT-SELF--" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">

<!--webbot bot="SaveDatabase" suggestedext="asp"
u-asp-include-url="../../_fpclass/fpdbform.inc" s-dataconnection="signup2004"
s-recordsource="Results" u-database-url="../../fpdb/signup2004.mdb"
u-confirmation-url="../../process4.asp" s-form-fields="R1 IM email comments
full_name Remote_computer_name User_name Browser_type Timestamp"
s-form-dbfields="R1 IM email comments full_name Remote_computer_name
User_name Browser_type Timestamp" startspan --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--#include
file="../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
i-checksum="43152" -->

<p><b>full_name</b><br>
<!--webbot bot="Validation" s-display-name="full_name" s-data-type="String"
b-value-required="False" i-maximum-length="255" --><input type="TEXT"
name="full_name" size="64" value="" maxlength="255"><br>
</p>
<p><b>email</b><br>
<!--webbot bot="Validation" s-display-name="email" s-data-type="String"
b-value-required="False" i-maximum-length="255" --><input type="TEXT"
name="email" size="64" value="" maxlength="255"><br>
</p>
<p><b>IM</b><br>
<!--webbot bot="Validation" s-display-name="IM" s-data-type="String"
b-value-required="False" i-maximum-length="255" --><input type="TEXT"
name="IM" size="64" value="" maxlength="255"><br>
</p>
<p><b>R1</b><br>
<!--webbot bot="Validation" s-display-name="R1" s-data-type="String"
b-value-required="False" i-maximum-length="255" --><input type="TEXT"
name="R1" size="64" value="" maxlength="255"><br>
</p>
<p><b>comments</b><br>
<!--webbot bot="Validation" s-display-name="comments" s-data-type="String"
b-value-required="False" i-maximum-length="0" --><textarea rows="10"
name="comments" cols="64"></textarea><br>
</p>
<p><input type="submit" value=" OK "><input type="reset" value=" Reset
"></p>

</form>
 
S

Stefan B Rusynko

Not sure where you got that asp code but it is all wrong
Your connection is to a text file, not your DB
You don't open a Record set from a DB - you need to open the table in the DB
SELECT * From tablename where some condition=somevalue
Since your form is using the DBRW try using the Database interface wizard until you learn ASP
Or Start at http://www.w3schools.com/asp/default.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Help! I need some help! Help! Oh, won't you please please help me?
|
| I've been at this for hours. I have asp code below that is not working
| correctly. Basicaly it is a script asking that my form pull the last record
| from my database (located in fpdb/signup2004.mdb). I use this method to post
| to a database and send a confirm email but it stopped working. I am positive
| it has something to do with the schema.ini file as well. Can someone take a
| look? Also, let me know what directories each file should sit in? The
| global.asa file is in the root and the schema.ini is in the fpdb folder.
| Thanks!! Would be very appreciative of any assistance!!
|
| <%
| '//////////////////////////////////////////////////////////
| '// The first two lines of code are calling the connection
| '// object for the text file that is stored in the
| '// global.asa file.
| '//////////////////////////////////////////////////////////
|
|
| Set Conn = Server.CreateObject("ADODB.Connection")
| Conn.Open Application("text_ConnectionString")
| '//////////////////////////////////////////////////////////
| '// Next you create a record set object, execute the
| '// database connection and a SQL query.
| '//////////////////////////////////////////////////////////
|
| Set RS = Conn.Execute ("SELECT * From fpdb/signup2004.mdb")
|
|
| '//////////////////////////////////////////////////////////
| '// You then use code to loop through the database and
| '// select the last record entered.
| '//////////////////////////////////////////////////////////
|
| Dim iCnt
| Do Until RS.EOF
| iCnt = iCnt + 1
| full_name = RS("full_name")
| email = RS("email")
| IM = RS("IM")
| R1 = RS("R1")
| Comments = RS("Comments")
| RS.MoveNext
| Loop
| '//////////////////////////////////////////////////////////
| '// Close the record set and the connection.
| '//////////////////////////////////////////////////////////
|
| RS.Close
| Conn.Close
| %>
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top