473,799 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1355
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******@bells outh-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.Tex t

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/cpconAccessingD ataWithADONET.a sp

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
3254
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. However when you retrieve these values into a dataset and ToString() them
7
4032
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 runtime, the report still showed the results from the default query (from within the Crystal Report). Then I tried the XSD solution where you define a dataset (that mataches the database and the Crystal Report) and have the Crystal Report use this....
3
1478
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 for a database driven web site, just for data entry. Could someone point me in the right direction. Any help is appreciated.
8
3225
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 'search' may be clicked on by the user and the user can then search all records by postcode. I want to do this to prevent duplicate data entry.
1
5501
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 following code after the "Application.Run(new VMSMain());": static void Main() { Application.Run(new VMSMain()); }
3
1581
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 String Dim strConn As String = "server=Gringotts;uid=sa;pwd=password;database=database"
16
2317
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, but cannot connect through code. I have done it before and can not do it now; I don't know what changed. (I also cannot connect to local Access database through code though I can from server explorer.) The code is: conn = New SqlConnection("data...
17
3554
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 populated when a user scans a label. The other is ScanDate - a date/time field that should equal the date/time of the scan (e.g. 7/31/2006 5:00:00 AM).
15
2585
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 determine who needs to receive the text message then send the message to the address. Only problem is, the employee may receive up to 4 of the same messages because each thread gets the recors then sends the message. I need somehow to prevent...
47
2888
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 help. I work in a library and send out dual language books to babies of dual or other nationality. The db is to be used for logging a range of book titles and numbers ordered and books sent out to individuals. I am trying to work out a way of...
0
9688
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
9544
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
10490
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...
0
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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,...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6809
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
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.