473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to Add data to database and send it also no an email?

Hello,

i have an ASP.net / VB page with a Script (submitValues) and a Form.

1. The form has 10 input text and a "Submit" button.
2. The script declares 10 variables. The value of each variable is taken
from each of the 10 input texts.
3. When the button "Submit" is click the variable values are sent to an
email address using AspNetEmail.

As an example, the button code is this one:
<asp:Button ID="submit" runat="server" OnClick="submitValues"
Text="Submit"/>

What i want is to add a new record in a database and insert this values in
it. I allready created the dataSet to the database.

So, when the "Submit" button is clicked, the values are inserted in a new
record in the database and are also sent to my email.

Can you help me out?

Thanks,
Miguel
Nov 20 '05 #1
1 1152
Miguel,

You will need to add the values to your dataset, and then use a DataAdapter
to update.

Or, you could always just use a simple command and some paramaters ...

cmd = new SqlCommand("INSERT INTO ... VALUES @name")
cmd.paramaters.add("@name",Name)
cmd.connection = new sqlconnection( ConnectionString )
cmd.connection.open
cmd.executeNonQuery
cmd.connection.close

-- Alex Papadimoulis

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
Hello,

i have an ASP.net / VB page with a Script (submitValues) and a Form.

1. The form has 10 input text and a "Submit" button.
2. The script declares 10 variables. The value of each variable is taken
from each of the 10 input texts.
3. When the button "Submit" is click the variable values are sent to an
email address using AspNetEmail.

As an example, the button code is this one:
<asp:Button ID="submit" runat="server" OnClick="submitValues"
Text="Submit"/>

What i want is to add a new record in a database and insert this values in
it. I allready created the dataSet to the database.

So, when the "Submit" button is clicked, the values are inserted in a new
record in the database and are also sent to my email.

Can you help me out?

Thanks,
Miguel

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Michel | last post by:
Hi, I like to build a small simple dinamic website: Point-of-sale (detail-shop), So entering stock, logging all sales, print out invoices and download the logs to be imported into Excel. I...
3
by: Sander Janssen | last post by:
Hello, I have this peculiar problem concerning MS SQL Server. My company works with an mailing application (ASP) which uses SQL Server as it's repository. What I want to do is send data...
3
by: Beryl Small | last post by:
Hi, I have a third party software that needs to send information to an .aspx page for processing to communicate with an SQL database. The software sends the information something like this: ...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
0
by: Marc DVer | last post by:
I am at kind of a loss on how to design a certain database project I am working on. Basically, we have a proprietary program with a standard backend (though we do not have direct write access to...
7
by: cover | last post by:
I have a form that writes to an MySQL database just fine but would like to email people to give them a heads up that an entry was made under their name (1 of 6 names on writing to the database). ...
0
grassh0pp3r
by: grassh0pp3r | last post by:
Hello, I'm trying to make a very simple comments page on my site using PHP and am having problems somewhere. I am very new to PHP. I was able to create one that works with comments appended, but...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
9
by: karenjfrancis | last post by:
I have 4 Access databases, all with the same data model but different data. I want to build a front end that brings all of the data in the 4 databases together into one. Assuming my table of...
4
by: canajien | last post by:
I need to have a php script pull data from a mysql table and send it in the body of an email I know I can get the script to display information in the browser by doing this: $i=0; while ($i...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.