Inserting values into a table

F

Fawke101

Hi there,

I am new to ASP and i have really only been exposed to getting data from a
SQL database and displaying it.

I want to include a page in my application (like a form in Access i guess)
with various text boxes and drop-downs + tick boxes.
Then i want to click a submit button that inserts the data (providing is
valid) into a SQL Server table.

I have had a search in google but nothing seems to explain this in its most
basic terms (errorchecking and inserting).

Could anyone give me an example of this or some background about this
functionality.

Thanks

--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 
J

Jeff Cochran

I am new to ASP and i have really only been exposed to getting data from a
SQL database and displaying it.

I want to include a page in my application (like a form in Access i guess)
with various text boxes and drop-downs + tick boxes.
Then i want to click a submit button that inserts the data (providing is
valid) into a SQL Server table.

I have had a search in google but nothing seems to explain this in its most
basic terms (errorchecking and inserting).

Could anyone give me an example of this or some background about this
functionality.

You need a better Google search then... )

Start with a basic ASP database tutorial and a SQL tutorial. For the
latter, use sqlcourse.com. For the former, Google "asp database
tutorial" and start reading. When you have that down, start
researching input error checking.

You may also need some HTML tutorials if you don't understand forms.

Jeff
 
F

Fawke101

Sorry,

I know my way around in HTML and ASP to a certain extent.
Its just that i have never been in the situation to use INSERT statements. I
didnt know what was/was not good practise and how exactly the INSERT worked.
I am not a complete novice, just new to this function.

Thanks anyhow, il have a look around

--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 
P

Phillip Windell

You should be able to find the syntax for Update and Insert in the searches
Jeff mentioned. Just remember that Insert is for adding entire "new"
records, while Update is to alter existing data.
 
J

Jeff Cochran

You should be able to find the syntax for Update and Insert in the searches
Jeff mentioned. Just remember that Insert is for adding entire "new"
records, while Update is to alter existing data.

And one solution to that is to do an IF EXISTS on the record to choose
whether to use an INSERT or UPDATE query. Books Online will give you
the syntax if you decide to look in that direction, as well as syntax
for the queries. The sqlcourse.com site covers each type of query
very concisely and is easy to understand.

Jeff
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top