Closed Thread Icon

Topic awaiting preservation: Adding new data problem (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12890" title="Pages that link to Topic awaiting preservation: Adding new data problem (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Adding new data problem <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-11-2003 04:20

Hi, guys. How are you?
Well, I succeed showing database on the Internet.
I created database called guestbook.mdb. It was great.
Then I tried to adding new data using server-side scripting.
I've been trying to this since this morning. But not yet.
I am feeling like being deep problem.
So please help me.

First of all, I created file called 1connect2.asp. It is actually to connect to database. Then created html file to enter some new data. It is a html form. Then I coded another asp file to add data. Whole process is consist of three different files.

Problem is:
When I submit new data via html form, some reason, error messages ocuppied whole screen.
My school ues Novell as local server. What I saw is:

quote:
HTTP Error
Status : 502 Bad Gateway
Description : Origin server is returning status code 500
Note : If necessary, please contact your Systems Administrator for resolution.



Hmm.....I succeed showing my database so that I assume something wrong with another asp file.
The code is:

code:
<%
Dim adoCon
Dim rsAddComments
Dim strSQL

Set adoCon="Server.CreateObject("ADODB.Connection")
adoCon.Provider="Microsoft.Jet.OLEDB.4.0"
adoCon.Open(Server.Mappath("\samurai13\guestbook.mdb"))
set rsAddComments=Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblComments.Name, tblComments.Comments FROM tblComments;"


rsAddComments.CursorType=2
rsAddComments.LockType=3
rsAddComments.Open strSQL, adoCon
rsAddComments.AddNew

rsAddComments.Fields("Name")=Request.Form("name")
rsAddComments.Fields("Comments")=Request.Form("comments")

rsAddComments.Update

rsAddComments.Close
Set rsAddComments=Nothing
Set adoCon=Nothing

Response.Redirect "1connect2.asp"
%>



Thanks for reading this.
Help please!




Hiroki Kozai

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 09-11-2003 09:15

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 09-12-2003 00:15

Thanks, mate.


Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu