DB Insertion Problem

My page is acting as if it is working but it is not depositing the values into the db. Should I be using a update query? My response.write statement is perfect as follows:
Code:

View Replies


ADVERTISEMENT

Null Insertion

I have a data entry form. If the user submits the form without entering any data, the record should be inserted with null entries for the respective fields.
But when i execute the INSERT SQL query with these null values, it gives me an error.
This is vat I am doing:

<%
.....
address = request.form("address")
if request.form("Age")= "" then
ageValue=""
.....
.....
%>
I use these values in SQL query
This is the SQL statement when the above is executed
" INSERT INTO tblStatistics (Age,address) VALUES (, aaa)"
Because of no value for age, the query is not gettin executed.
I dont want a 0, I want a nul entry (<null>).
Could someone throw some light on how to set the age field to null?

View Replies View Related

Sql Insertion Problem

I have a lil text box that I use to insert into a db. It inserts fine, but anytime i post something like

he said "i don't know" how to do this

the only thing that shows up is everything before the quote.

Am I suppose to be doing a replace for quotes also or does it only apply to apostrophes?

View Replies View Related

Record Insertion Error

A page I'm working on contains a registration form which is supposed to a) update an Access database using ASP and b) email the contents of the submitted form to the camp administrator.

This is my first experience with ASP, and with any kind of database interfacing language, for that matter. Currently I'm struggling with the record insertion. I'll worry about email afterwards.

I'm using Dreamweaver 8, which is generating all the code for me. I have a testing server set up on my local machine (in my working directory, in fact). I've told DW to connect to the databse (located in %siteroot%/database) through the testing server using a DSN (same DSN as on the web server). Code:

View Replies View Related

Cleaning Up Text For Database Insertion

I'm trying to write a page that will accept form POST method variables from another page and save them to an Access database via a DSN connection. I'm using code like this:

<%
SQL = "INSERT INTO myTable (postVar1,postVar2,postVar3)"
SQL = SQL & " VALUES ('" & request.form("postVar1") & "','" & request.form("postVar2") & "','" & request.form("postVar3") & "')"

dsnConn.execute(mySQL)
%>

I'd like to make sure that I clean up the text that the user inputs before trying to send it to the database. Can someone please give me an example of what ASP code I need use to get rid of quotes, slashes, and anything else a user could enter that might mess up the SQL insert?

View Replies View Related

Example Code For Using Insertion Point Of Data

anyone have a quick example of using insertion point of data with MSWC.Tools ?

e.g. how can I send data to "div" tag ?

Set oTools = Server.CreateObject("MSWC.Tools" )
oTools.processForm "output.asp", "template.asp", "<div>"

View Replies View Related

Dynamic Data Insertion For Cart

I have a Dynamic product page that displays the items using "DO UNTIL rs.EOF" and I have assigned form input type to be hidden(for some) for information that I would like to retrieve. On the product page I have a "Add to Cart" button which points to my "addCart.asp".

addCart.asp is where I would insert the items into a Table called "cartItems" in the Database when the user clicks on the "Add to Cart" button.

My "addCart.asp" now generates a "Syntax error in INSERT INTO statement." which I think is caused by my inability to filter for the values from the product page and insert it into the "cartItems" table. Code:

View Replies View Related

Upload - Double Insertion Into Database

I am using ASP Upload to upload an image to a website. I have other form fields in the form that are used to obtain data and are inserted into an access database. This occurs on the same page as the page that upload the image. Everything works fine except it inserts each record twice into the database. Anyone have an idea what causes this or what I can do to make it only insert once. I am useing the progress bar and don't know if that has anything to do with it. Here is my code.

Set rsPhoto = Server.CreateObject("ADODB.RecordSet")
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.ProgressID = Request.QueryString("PID")
Upload.SetMaxSize 500000, True
Upload.Save ....

View Replies View Related

Insertion In Temporary Table From Query!

i have written a stored procedure. depending upon different parameters, query is prepared as string and executed through exec() function. it returns a certain number of rows. stored procedure also contains a temporary table. the question is this how can i insert the rows returned by the query in to temporary table?

View Replies View Related

Using Insertion Point Of Data With MSWC.Tools

anyone have an example of using insertion point of data with MSWC.Tools ?

e.g. how can I send data to a "div" tag ?

Set oTools = Server.CreateObject("MSWC.Tools" )
oTools.processForm "output.asp", "template.asp", "<div>"

View Replies View Related

Database Insertion Statement Error Handling

I need to know how to handle errors if a write to the database fails. Here's the pseudo-code:

View Replies View Related

Mail Insertion Hack On Send Mail Form

I'm using CDO to send mail to the site owner from ASP pages with forms.
Recently one of my forms is occasionally sending email with what seems
to be an insertion which is replacing the plain text part of the email
with something else. Looking at the server sent email source, the
hacked emails have the following:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved