473,795 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="submit Values"
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 1174
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("INS ERT INTO ... VALUES @name")
cmd.paramaters. add("@name",Nam e)
cmd.connection = new sqlconnection( ConnectionStrin g )
cmd.connection. open
cmd.executeNonQ uery
cmd.connection. close

-- Alex Papadimoulis

"Miguel Dias Moura" <we****@27NOSPA Mlamps.com> wrote in message
news:e8******** ******@TK2MSFTN GP09.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="submit Values"
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
2791
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 once could write a bit in ASP/SQL/HTML/JAVASCRIPT and even some Excel-VBA but have lost most knowledge about that and I never know a lot nor did I know how to set up a simulating PC to write and test the website.
3
1796
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 directly from my own application to this SQL Server in order to feed the mailing application. To test if this was possible I linked the tables from SQL Server in MS
3
2001
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: Mypage.aspx?Password=Mypassword When this request hits the page, I need to pull that variable Mypassword to use in my VB function to query the database. I'm confused on how to get it. I tried using
5
3029
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 need to send data from my server via the post method to the payment server. The payment server does not run asp.net. I dont know what they run. The payment server then returns to my server with the
0
1301
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 the backend). What I am working on is a project to take certain data from the database, send it to certain vendors, process the data, and send it back to the proprietary program. Here is the basic flow as is supposed to happen: 1. Extract...
7
1580
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). This server exists on an intranet and would have no 'web' function other than using possibly the existing email server. Is all that I need to do to make this happen, to change php.ini as follows:
0
1722
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 I want the latest comment to be on top, and that's where I'm running into trouble. Since I know very little about PHP, I thought I was clever in what I came up with. I think it can work if I get the coding right. Let me know if my logic is wrong. I'm...
2
3583
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 uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
9
2186
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 interest is called Removals, if I create linked tables I end up with Removals1, Removals2, Removals3 and Removals4. I could easily write a query to base a form or report upon to concatenate all of these tables' data into one view. However, the...
4
2062
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 < $num) { $who=mysql_result($result,$i,"who");
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.