Click here to Skip to main content
15,925,440 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: clearing a data table Pin
S Douglas5-Sep-06 14:14
professionalS Douglas5-Sep-06 14:14 
QuestionHow I can get the text of a textbox that is on other app? Pin
Marco22504-Sep-06 14:54
Marco22504-Sep-06 14:54 
QuestionCalculating Date Pin
Nikhil Bandekar4-Sep-06 8:21
Nikhil Bandekar4-Sep-06 8:21 
AnswerRe: Calculating Date Pin
Guffa4-Sep-06 8:40
Guffa4-Sep-06 8:40 
GeneralRe: Calculating Date Pin
Nikhil Bandekar4-Sep-06 23:18
Nikhil Bandekar4-Sep-06 23:18 
QuestionCreate a Control Pin
Magno R. Vasquez4-Sep-06 8:13
Magno R. Vasquez4-Sep-06 8:13 
Questioninsert datatable into database Pin
playout4-Sep-06 7:30
playout4-Sep-06 7:30 
AnswerRe: insert datatable into database Pin
Dave Sexton5-Sep-06 0:44
Dave Sexton5-Sep-06 0:44 
First, when you configured your data adapter did you add update/insert statements?

If yes, then here's how to do it.

1. Create a new datarow off your dataset,
2. Add data to that datarow.
3. Add the row to the dataset.
3. Update the data source through the data adpaters Update method.

e.g. some sample code to update a name & surname to a database. (ds1 = dataset, da1 = data adapter, conn = connection).

'create a new datarow off a dataset
Dim dr As DataRow = Ds1.tblNames.NewRow

'add data to the row
dr.Item("Name") = txtName.Text
dr.Item("Surname") = txtSurname.Text

'add the new row to the dataset
Ds1.tblNames.Rows.Add(dr)
'update the data source
Try
   conn.Open()
   da1.Update(Ds1)
Catch ex As Exception
   MessageBox.Show(ex.Message)
Finally
   conn.Close()
End Try

You will obviously need to perform validation on the data to ensure that it is valid but that's the basic idea.

Hope that helps.
QuestionWeb Part behaviour in Window Form Pin
Mohamed Ali Jinnah4-Sep-06 7:06
Mohamed Ali Jinnah4-Sep-06 7:06 
QuestionHelp with .NET Pin
Tommy4U4-Sep-06 6:22
Tommy4U4-Sep-06 6:22 
AnswerHelp with .NET Pin
Kanniah5-Sep-06 4:17
Kanniah5-Sep-06 4:17 
QuestionStamping PDF Pages Pin
Mansurali4-Sep-06 5:40
Mansurali4-Sep-06 5:40 
QuestionDatagrid display parent and child records (datarelation) Pin
Izak -4-Sep-06 5:07
Izak -4-Sep-06 5:07 
AnswerRe: Datagrid display parent and child records (datarelation) Pin
Dave Sexton5-Sep-06 0:46
Dave Sexton5-Sep-06 0:46 
GeneralRe: Datagrid display parent and child records (datarelation) Pin
Izak -5-Sep-06 3:15
Izak -5-Sep-06 3:15 
QuestionDeployment of A program in VB.Net Pin
FriendlySoluations4-Sep-06 4:35
FriendlySoluations4-Sep-06 4:35 
AnswerRe: Deployment of A program in VB.Net Pin
KreativeKai5-Sep-06 5:53
professionalKreativeKai5-Sep-06 5:53 
QuestionDeployment of A program in VB.Net Pin
FriendlySoluations4-Sep-06 4:32
FriendlySoluations4-Sep-06 4:32 
AnswerRe: Deployment of A program in VB.Net Pin
Tommy4U4-Sep-06 6:32
Tommy4U4-Sep-06 6:32 
AnswerRe: Deployment of A program in VB.Net Pin
Nikhil Bandekar4-Sep-06 7:07
Nikhil Bandekar4-Sep-06 7:07 
GeneralRe: Deployment of A program in VB.Net Pin
FriendlySoluations4-Sep-06 21:02
FriendlySoluations4-Sep-06 21:02 
GeneralDeployment of A program in VB.Net Pin
Kanniah5-Sep-06 4:19
Kanniah5-Sep-06 4:19 
QuestionNetwork Pin
FriendlySoluations4-Sep-06 4:31
FriendlySoluations4-Sep-06 4:31 
Questionutilities library Pin
Marc Soleda4-Sep-06 3:37
Marc Soleda4-Sep-06 3:37 
QuestionNetwork Pin
mng@yahoo.com4-Sep-06 3:14
mng@yahoo.com4-Sep-06 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.