PDA

View Full Version : ASP form not updating Database


Jacob-Bushnell
03-08-2003, 12:35 AM
Hi, I have an ASP forp that appears to work but does not update my DB. I am not very good at ASP so I was wondering if someone could take a look at my code and tell me where the problem lies.
The form is at http://www.nathhan.org/test_form.htm
You can see the codes I am using at http://www.nathhan.org/code.htm
Thanks a lot JakeBushnell@aol.com

whammy
03-08-2003, 03:00 AM
Are you getting an error message? Or perhaps "The page cannot be displayed"?

I have never used update/insert queries like this, and they still mystify me since I didn't learn it this way and none of the developers I know use it, although I see this stuff plastered all over the net.

I prefer queries that make sense in SQL... ?

I'm not sure that you should use obj.AddNew and obj.Update in the same page, but I don't know, like I said - so I'm just guessing here. I prefer that my queries are exactly (or darn close to) what SQL is looking at...

Jacob-Bushnell
03-08-2003, 03:14 AM
No, I am not getting any error messages. I wish I was, then I would have somthing to go off of!
I know the feeling about not understanding what I am seeing. :confused:
I am new to ASP but I am detemind to learn it! :mad:
Jakebushnell@aol.com

whammy
03-08-2003, 03:19 AM
Ok, well I was able to submit the form...

Did it create a new record?

If I were you I'd make a test form with just ONE field that submits to a test table, and make sure it works. If that works, great - move on to the next step, and so on.

If it doesn't work, then you have something to research. ;)

It's usually best to start troubleshooting like that - it eliminates many other problems right off the bat, so you can pinpoint where the actual error is occuring.

Jacob-Bushnell
03-08-2003, 03:22 AM
Good Idea Whammy, I will try that next.
No the table does not show any new records :(

whammy
03-08-2003, 03:27 AM
Perhaps someone familiar with this method of inserting/updating will give a hand.

I think perhaps the Conn.Execute(SQLStatementHere) is never happening, or you'd either be getting a value in your database or an error message.

So it seems like the SQL statement isn't being executed.