PC Review


Reply
Thread Tools Rate Thread

Database add record

 
 
L Scal
Guest
Posts: n/a
 
      10th Mar 2004
My application requires that I accept form data from (angel.com) another
site using POST method to add records to an Access db. I've been having
trouble getting information from them, but I think I've grasped the concept,
and just need a script that adds or inserts a record. I'm trying to test it
on my server first so I know it works, but so far it does not.

The form page is http://erecognitions.com/angeltest.asp. It posts the data
to the following file named angel_insert.asp:

<!--#INCLUDE VIRTUAL="/include/connect.inc"-->

<%
DIM objRS
Set objRS = Server.Create.Object("ADODB.Recordset")
objRS.Open "angel", objConn, , adLockOptimistic,
adCmdTable

objRS.AddNew
ObjRS("CallerID") = Request.Form("CallerID")
ObjRS("AngelNumber") = Request.Form("AngelNumber")
ObjRS("Internet") = Request.Form("Internet")
ObjRS("Marital") = Request.Form("Marital")
ObjRS("Nice") = Request.Form("Nice")
objRS.Update
%>

<%
objRS.Close
Set objRS = Nothing
objCONN.Close
Set objCONN = Nothing
%>

The connect include file is:

<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=A4785_angel"
'DSN name assigned by host
objConn.Open
%>

I got the code for these from internet code sources. Can anyone tell me why
this won't work?

Thanks
LScal


 
Reply With Quote
 
 
 
 
Jim Buyens
Guest
Posts: n/a
 
      10th Mar 2004
There are too many possible problems to describe them all.
Therefore, please post the exact error messge you're
receiving.

Or, if you prefer a fresh start, browse:

Saving Form Data in a Database
http://www.interlacken.com/winnt/tip...ow.aspx?tip=44

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------



>-----Original Message-----
>My application requires that I accept form data from

(angel.com) another
>site using POST method to add records to an Access db.

I've been having
>trouble getting information from them, but I think I've

grasped the concept,
>and just need a script that adds or inserts a record.

I'm trying to test it
>on my server first so I know it works, but so far it does

not.
>
>The form page is http://erecognitions.com/angeltest.asp.

It posts the data
>to the following file named angel_insert.asp:
>
><!--#INCLUDE VIRTUAL="/include/connect.inc"-->
>
><%
>DIM objRS
>Set objRS = Server.Create.Object("ADODB.Recordset")
>objRS.Open "angel", objConn, , adLockOptimistic,
>adCmdTable
>
>objRS.AddNew
>ObjRS("CallerID") = Request.Form("CallerID")
>ObjRS("AngelNumber") = Request.Form("AngelNumber")
>ObjRS("Internet") = Request.Form("Internet")
>ObjRS("Marital") = Request.Form("Marital")
>ObjRS("Nice") = Request.Form("Nice")
>objRS.Update
>%>
>
><%
>objRS.Close
>Set objRS = Nothing
>objCONN.Close
>Set objCONN = Nothing
>%>
>
>The connect include file is:
>
><%
>Dim objConn
>Set objConn = Server.CreateObject("ADODB.Connection")
>objConn.ConnectionString = "DSN=A4785_angel"
>'DSN name assigned by host
>objConn.Open
>%>
>
>I got the code for these from internet code sources. Can

anyone tell me why
>this won't work?
>
>Thanks
>LScal
>
>
>.
>

 
Reply With Quote
 
L Scal
Guest
Posts: n/a
 
      11th Mar 2004
Jim and all
Thanks for the help. I've been trying to make this work for about 10 days
now.
When I test my stuff on my own server (not in the actual application), I get
an HTTP 500 Internal server error response.
I took your advice and went to the link. I used the code only changing
things to suit my needs, as best I could. Like the mappath, table, db
fields and form fields. I'm getting a 500 error with that page, too.
Should I post that code?
Again, any help would be very much appreciated.

LScal
"A sharp stick in the eye would less painful"

"Jim Buyens" <(E-Mail Removed)> wrote in message
news:a3dc01c406bf$4ff2f820$(E-Mail Removed)...
> There are too many possible problems to describe them all.
> Therefore, please post the exact error messge you're
> receiving.
>
> Or, if you prefer a fresh start, browse:
>
> Saving Form Data in a Database
> http://www.interlacken.com/winnt/tip...ow.aspx?tip=44
>
> Jim Buyens
> Microsoft FrontPage MVP
> http://www.interlacken.com
> Author of:
> *----------------------------------------------------
> |\---------------------------------------------------
> || Microsoft Office FrontPage 2003 Inside Out
> ||---------------------------------------------------
> || Web Database Development Step by Step .NET Edition
> || Microsoft FrontPage Version 2002 Inside Out
> || Faster Smarter Beginning Programming
> || (All from Microsoft Press)
> |/---------------------------------------------------
> *----------------------------------------------------
>
>
>
> >-----Original Message-----
> >My application requires that I accept form data from

> (angel.com) another
> >site using POST method to add records to an Access db.

> I've been having
> >trouble getting information from them, but I think I've

> grasped the concept,
> >and just need a script that adds or inserts a record.

> I'm trying to test it
> >on my server first so I know it works, but so far it does

> not.
> >
> >The form page is http://erecognitions.com/angeltest.asp.

> It posts the data
> >to the following file named angel_insert.asp:
> >
> ><!--#INCLUDE VIRTUAL="/include/connect.inc"-->
> >
> ><%
> >DIM objRS
> >Set objRS = Server.Create.Object("ADODB.Recordset")
> >objRS.Open "angel", objConn, , adLockOptimistic,
> >adCmdTable
> >
> >objRS.AddNew
> >ObjRS("CallerID") = Request.Form("CallerID")
> >ObjRS("AngelNumber") = Request.Form("AngelNumber")
> >ObjRS("Internet") = Request.Form("Internet")
> >ObjRS("Marital") = Request.Form("Marital")
> >ObjRS("Nice") = Request.Form("Nice")
> >objRS.Update
> >%>
> >
> ><%
> >objRS.Close
> >Set objRS = Nothing
> >objCONN.Close
> >Set objCONN = Nothing
> >%>
> >
> >The connect include file is:
> >
> ><%
> >Dim objConn
> >Set objConn = Server.CreateObject("ADODB.Connection")
> >objConn.ConnectionString = "DSN=A4785_angel"
> >'DSN name assigned by host
> >objConn.Open
> >%>
> >
> >I got the code for these from internet code sources. Can

> anyone tell me why
> >this won't work?
> >
> >Thanks
> >LScal
> >
> >
> >.
> >



 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      11th Mar 2004
"HTTP 500 Internal server error" is still a very generic response. Are
you sure there isn't a most descriptive message somewhere?

One thing you can try to get a better message is:

1. In IE, choose Internet Options from the Tools menu.
2. Click the Advanced tab.
3. Under Browsing, uncheck Show Friendly HTTP Error Messages.
4. Click OK, then recreate the error.

If you can't find a better message, then post the entire code for the
Web page (making any passwords or other sensitive data).

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------





"L Scal" <(E-Mail Removed)> wrote in message news:<TvR3c.2791$mM.44280@attbi_s02>...
> Jim and all
> Thanks for the help. I've been trying to make this work for about 10 days
> now.
> When I test my stuff on my own server (not in the actual application), I get
> an HTTP 500 Internal server error response.
> I took your advice and went to the link. I used the code only changing
> things to suit my needs, as best I could. Like the mappath, table, db
> fields and form fields. I'm getting a 500 error with that page, too.
> Should I post that code?
> Again, any help would be very much appreciated.
>
> LScal
> "A sharp stick in the eye would less painful"
>
> "Jim Buyens" <(E-Mail Removed)> wrote in message
> news:a3dc01c406bf$4ff2f820$(E-Mail Removed)...
> > There are too many possible problems to describe them all.
> > Therefore, please post the exact error messge you're
> > receiving.
> >
> > Or, if you prefer a fresh start, browse:
> >
> > Saving Form Data in a Database
> > http://www.interlacken.com/winnt/tip...ow.aspx?tip=44
> >
> > Jim Buyens
> > Microsoft FrontPage MVP
> > http://www.interlacken.com
> > Author of:
> > *----------------------------------------------------
> > |\---------------------------------------------------
> > || Microsoft Office FrontPage 2003 Inside Out
> > ||---------------------------------------------------
> > || Web Database Development Step by Step .NET Edition
> > || Microsoft FrontPage Version 2002 Inside Out
> > || Faster Smarter Beginning Programming
> > || (All from Microsoft Press)
> > |/---------------------------------------------------
> > *----------------------------------------------------
> >
> >
> >
> > >-----Original Message-----
> > >My application requires that I accept form data from

> (angel.com) another
> > >site using POST method to add records to an Access db.

> I've been having
> > >trouble getting information from them, but I think I've

> grasped the concept,
> > >and just need a script that adds or inserts a record.

> I'm trying to test it
> > >on my server first so I know it works, but so far it does

> not.
> > >
> > >The form page is http://erecognitions.com/angeltest.asp.

> It posts the data
> > >to the following file named angel_insert.asp:
> > >
> > ><!--#INCLUDE VIRTUAL="/include/connect.inc"-->
> > >
> > ><%
> > >DIM objRS
> > >Set objRS = Server.Create.Object("ADODB.Recordset")
> > >objRS.Open "angel", objConn, , adLockOptimistic,
> > >adCmdTable
> > >
> > >objRS.AddNew
> > >ObjRS("CallerID") = Request.Form("CallerID")
> > >ObjRS("AngelNumber") = Request.Form("AngelNumber")
> > >ObjRS("Internet") = Request.Form("Internet")
> > >ObjRS("Marital") = Request.Form("Marital")
> > >ObjRS("Nice") = Request.Form("Nice")
> > >objRS.Update
> > >%>
> > >
> > ><%
> > >objRS.Close
> > >Set objRS = Nothing
> > >objCONN.Close
> > >Set objCONN = Nothing
> > >%>
> > >
> > >The connect include file is:
> > >
> > ><%
> > >Dim objConn
> > >Set objConn = Server.CreateObject("ADODB.Connection")
> > >objConn.ConnectionString = "DSN=A4785_angel"
> > >'DSN name assigned by host
> > >objConn.Open
> > >%>
> > >
> > >I got the code for these from internet code sources. Can

> anyone tell me why
> > >this won't work?
> > >
> > >Thanks
> > >LScal
> > >
> > >
> > >.
> > >

 
Reply With Quote
 
L Scal
Guest
Posts: n/a
 
      12th Mar 2004
That worked well. I was able to figure out what I did wrong with your code,
and now the page itself works great. I directed the angel.com voice
software to the url and tested using their resource, but no records were
added to the db. I tried it with and without the HTML since there's no
actual page to view. If they're sending form data using the POST method as
they say they are this should work, yes?

Thanks again.
LScal



"Jim Buyens" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "HTTP 500 Internal server error" is still a very generic response. Are
> you sure there isn't a most descriptive message somewhere?
>
> One thing you can try to get a better message is:
>
> 1. In IE, choose Internet Options from the Tools menu.
> 2. Click the Advanced tab.
> 3. Under Browsing, uncheck Show Friendly HTTP Error Messages.
> 4. Click OK, then recreate the error.
>
> If you can't find a better message, then post the entire code for the
> Web page (making any passwords or other sensitive data).
>
> Jim Buyens
> Microsoft FrontPage MVP
> http://www.interlacken.com
> Author of:
> *----------------------------------------------------
> |\---------------------------------------------------
> || Microsoft Office FrontPage 2003 Inside Out
> ||---------------------------------------------------
> || Web Database Development Step by Step .NET Edition
> || Microsoft FrontPage Version 2002 Inside Out
> || Faster Smarter Beginning Programming
> || (All from Microsoft Press)
> |/---------------------------------------------------
> *----------------------------------------------------
>
>
>
>
>
> "L Scal" <(E-Mail Removed)> wrote in message

news:<TvR3c.2791$mM.44280@attbi_s02>...
> > Jim and all
> > Thanks for the help. I've been trying to make this work for about 10

days
> > now.
> > When I test my stuff on my own server (not in the actual application), I

get
> > an HTTP 500 Internal server error response.
> > I took your advice and went to the link. I used the code only changing
> > things to suit my needs, as best I could. Like the mappath, table, db
> > fields and form fields. I'm getting a 500 error with that page, too.
> > Should I post that code?
> > Again, any help would be very much appreciated.
> >
> > LScal
> > "A sharp stick in the eye would less painful"
> >
> > "Jim Buyens" <(E-Mail Removed)> wrote in message
> > news:a3dc01c406bf$4ff2f820$(E-Mail Removed)...
> > > There are too many possible problems to describe them all.
> > > Therefore, please post the exact error messge you're
> > > receiving.
> > >
> > > Or, if you prefer a fresh start, browse:
> > >
> > > Saving Form Data in a Database
> > > http://www.interlacken.com/winnt/tip...ow.aspx?tip=44
> > >
> > > Jim Buyens
> > > Microsoft FrontPage MVP
> > > http://www.interlacken.com
> > > Author of:
> > > *----------------------------------------------------
> > > |\---------------------------------------------------
> > > || Microsoft Office FrontPage 2003 Inside Out
> > > ||---------------------------------------------------
> > > || Web Database Development Step by Step .NET Edition
> > > || Microsoft FrontPage Version 2002 Inside Out
> > > || Faster Smarter Beginning Programming
> > > || (All from Microsoft Press)
> > > |/---------------------------------------------------
> > > *----------------------------------------------------
> > >
> > >
> > >
> > > >-----Original Message-----
> > > >My application requires that I accept form data from

> > (angel.com) another
> > > >site using POST method to add records to an Access db.

> > I've been having
> > > >trouble getting information from them, but I think I've

> > grasped the concept,
> > > >and just need a script that adds or inserts a record.

> > I'm trying to test it
> > > >on my server first so I know it works, but so far it does

> > not.
> > > >
> > > >The form page is http://erecognitions.com/angeltest.asp.

> > It posts the data
> > > >to the following file named angel_insert.asp:
> > > >
> > > ><!--#INCLUDE VIRTUAL="/include/connect.inc"-->
> > > >
> > > ><%
> > > >DIM objRS
> > > >Set objRS = Server.Create.Object("ADODB.Recordset")
> > > >objRS.Open "angel", objConn, , adLockOptimistic,
> > > >adCmdTable
> > > >
> > > >objRS.AddNew
> > > >ObjRS("CallerID") = Request.Form("CallerID")
> > > >ObjRS("AngelNumber") = Request.Form("AngelNumber")
> > > >ObjRS("Internet") = Request.Form("Internet")
> > > >ObjRS("Marital") = Request.Form("Marital")
> > > >ObjRS("Nice") = Request.Form("Nice")
> > > >objRS.Update
> > > >%>
> > > >
> > > ><%
> > > >objRS.Close
> > > >Set objRS = Nothing
> > > >objCONN.Close
> > > >Set objCONN = Nothing
> > > >%>
> > > >
> > > >The connect include file is:
> > > >
> > > ><%
> > > >Dim objConn
> > > >Set objConn = Server.CreateObject("ADODB.Connection")
> > > >objConn.ConnectionString = "DSN=A4785_angel"
> > > >'DSN name assigned by host
> > > >objConn.Open
> > > >%>
> > > >
> > > >I got the code for these from internet code sources. Can

> > anyone tell me why
> > > >this won't work?
> > > >
> > > >Thanks
> > > >LScal
> > > >
> > > >
> > > >.
> > > >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I insert a photo in a database record for that record only Chris Microsoft Access Getting Started 3 30th Dec 2007 08:17 PM
Clone a record, edit it and add as new record to database. tony_schullo@csx.com Microsoft Excel Programming 0 26th Oct 2007 04:34 PM
Cannot save record. Jet database engine cannot find a record =?Utf-8?B?SmFtZXMxOTU0?= Microsoft Access 0 12th Sep 2006 01:35 AM
EXPORT ACCESS TO SQL DATABASE RECORD BY RECORD... gssitaly via AccessMonster.com Microsoft Access VBA Modules 1 19th Jun 2006 04:14 PM
Copy fields from one record into another record in same database GINNY Microsoft Access Form Coding 2 15th Apr 2004 01:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 AM.