473,408 Members | 1,771 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,408 software developers and data experts.

Help getting data into database

First off - New to Programming.

Problem: I created an aspx page with x amount of text boxes. These
text boxes can be filled by the user and when they click the submit
button I want the data in each box to be inserted in database fields
that they relate to. I created a database and a table with the same
amount of cols as I have textboxes. Company_Name textbox data should
go into the Company_Name field I have in SQL Database and so forth.
What is the best way or better yet - how do I get this textbox data
into my database. I've tried searching for answers but down to hope
now. Any help and/or examples would be greatly appreciated. Once I
can get this working, I'm sure I'll have more questions.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #1
4 1340
you need to first learn how to use insert statements...
insert statement essentially insert data into the database table.

once you are done with that... use ado.net to connect to the database
and then do an insert using ado.net

what i would say is get yourself a nice book and start gently... no need to
rush bout... its very simple...

--
Regards,

HD

Once a Geek.... Always a Geek

Once a Geek... Always a Geek
"scurenton" <cu******@bellsouth-dot-net.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
First off - New to Programming.

Problem: I created an aspx page with x amount of text boxes. These
text boxes can be filled by the user and when they click the submit
button I want the data in each box to be inserted in database fields
that they relate to. I created a database and a table with the same
amount of cols as I have textboxes. Company_Name textbox data should
go into the Company_Name field I have in SQL Database and so forth.
What is the best way or better yet - how do I get this textbox data
into my database. I've tried searching for answers but down to hope
now. Any help and/or examples would be greatly appreciated. Once I
can get this working, I'm sure I'll have more questions.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 18 '05 #2
Very roughly...what you want is...for each textbox, pull
out it's value, then, using ADO .NET, connect to your
database, then, using a sql statement, insert the value
you pulled out into your database.

You can pull out the value from each textbox by using the
Text property of each textbox.

e.g.
Dim name As String = NameTextBox.Text

To do the rest of what you want, you must know about sql
(the language used to interact with the database) and
about ADO .NET (used to get your .NET code talking to the
database).

Here's the online documentation for ADO .NET:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpguide/html/cpconAccessingDataWithADONET.asp

Here's the online documentation for transact sql
(specifically, for the INSERT statement):

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/tsqlref/ts_ia-iz_5cl0.asp

Watch out for line breaks when you copy-and-paste the
links above.

Hope this helps some
-----Original Message-----
First off - New to Programming.

Problem: I created an aspx page with x amount of text boxes. Thesetext boxes can be filled by the user and when they click the submitbutton I want the data in each box to be inserted in database fieldsthat they relate to. I created a database and a table with the sameamount of cols as I have textboxes. Company_Name textbox data shouldgo into the Company_Name field I have in SQL Database and so forth.What is the best way or better yet - how do I get this textbox datainto my database. I've tried searching for answers but down to hopenow. Any help and/or examples would be greatly appreciated. Once Ican get this working, I'm sure I'll have more questions.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
---------------------------------------------------------- http://www.usenet.com
.

Nov 18 '05 #3
Thanks for pointing me in the right directions. Went back to work and
drilled into ADO.NET and SQL for a while. I created a Stored
Procedure in SQL and Called it in my .NET app using a connection
string, SqlCommand, and InsertData string = to "EXEC StoredProc '"
& textbox.text & "',"'...... Anyway, ran the program and
worked great. Thanks
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #4
Thanks for pointing me in the right directions. Went back to work and
drilled into ADO.NET and SQL for a while. I created a Stored
Procedure in SQL and Called it in my .NET app using a connection
string, SqlCommand, and InsertData string = to "EXEC StoredProc '"
& textbox.text & "',"'...... Anyway, ran the program and
worked great. Thanks
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #5

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

Similar topics

40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
3
by: bpn | last post by:
I have a Microsoft Access database on a web server that supports Access databases. All I want to do is have a couple of users be able to enter data into the database via a browser. This is not...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
3
by: luna | last post by:
theres no errors in my code - but it does nothing at all - its supposed to be populating text boxes!! any ideas ? (im am pretty new to all this) If Not Page.IsPostBack Then Dim search As...
16
by: peshekeedweller | last post by:
Using asp.net 1.1. vb.net 2003. I am trying to connect to a remote sql server 2000 on a virtual machine running windows 2000 server. I can connect through the server explorer in visual studio,...
17
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
47
by: Jo | last post by:
Hi there, I'm Jo and it's the first time I've posted here. I'm in process of creating a database at work and have come a little unstuck.....I'm a bit of a novice and wondered if anyone could...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.