473,402 Members | 2,072 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,402 software developers and data experts.

vb.net 2003 display data from Sql DB

So far I have a datagrid that can display data from Sql DB. I also have the edit, update, and cancel buttons working properly once the data is already in the database.

I am having difficulty entering new user data into DB however. I can enter fake data with a simple insert command and then update it, but I need a proper insert code for the first row of data to insert. Below I have started the add code to the datagrid. I have it to the point where the user can fill out the info that needs to be inserted to the DB, now I need the insert command, anyhelp??
Thanks for any advice!!!!!!!!

Dim dr As DataRow = Me.DsEnroller4.Transmittal.NewTransmittalRow
dr("RepName") = Person
dr("CurrentDate") = txtDate.Text

Me.DsEnroller4.Transmittal.Rows.InsertAt(dr, 0)
Session("DsEnroller") = DsEnroller4

DataGrid1.EditItemIndex = 0

DataGrid1.DataBind()
Jun 20 '07 #1
3 1450
kenobewan
4,871 Expert 4TB
Welcome to TSDN. Once you have the updated vales insert them using sql. What is problem?
Jun 21 '07 #2
I'm not sure how to write the insert command and execute it in my code. I haven't programmed in a couple years so I think the problem is between the chair and keyboard (me). How do I declare the variables from the datagrid in my sql insert command, Parameters? Lets pretend I was inserting three new columns FirstName, LastName, EmpID. What would be the proper code/sql query to insert new record to sql db.

Thanks!!
Jun 21 '07 #3
faeez
1
How To Insert Into Datagrid And Text Box From The Same Databse In Vb.net 2003?
Jun 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
1
by: Corrie Meyer | last post by:
Announcement: SwiftReports standard edition 1.0 for Visual Studio ..NET 2003 released by UniSwift. We are pleased to announce the first release of a fully-managed reporting tool for the...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: Andy | last post by:
Hi, I'm trying to get a users free/busy status from exchange from within a website and using the code below, but when I run this a login page from MS Outlook Web Access is retrieved from the...
3
by: Bobby | last post by:
Hi, I have an application which uses Access 2003 as both the FE and the BE. However, for a number of good reasons, I am in the process of converting the BE to SQL server 2003. I am not converting...
1
by: reynolda | last post by:
I have some intranet pages that ran fine on 2000 server. They use java applets bought from KavaChart several years ( and several versions) ago. Within the htm you define what sort of chart, and the...
6
by: jkmobil | last post by:
Been using Access 97 for years. I use a statistics add-on (Total Access Statistics) which is kind of expensive and I haven't found anything to be gained by upgrading. But I'm now told I probably...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
0
by: selvialagar | last post by:
I'm working in vc++.net 2003 (dll) for communicating with an device through TCP communication. My task is to send request to the device and receiving response from the device and dismandle the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.