|
-
May 3rd, 2003, 05:22 AM
#1
Thread Starter
Junior Member
how to update data using dataset?
This sample code for connecting to database and Inserting values into oracle database.
I want to update the Record,please help me regarding this?
Dim Cn As String
Dim strprovider As String = New String("MSDAORA")
Dim strdatasource As String = New String("HMWORA01")
Dim struserid As String = New String("sysedp")
Dim strpass As String = New String("sysedp")
Cn = "Provider=" & strprovider & ";Data Source=" & strdatasource & ";User Id=" & struserid & ";Password=" & strpass & ";"
Dim Conn As New OleDb.OleDbConnection(Cn)
MsgBox("Connected")
'This code is used to inserting data into oracle database
conn.Open()
objDA = New OleDb.OleDbDataAdapter("select * from makemast", conn)
objcb = New OleDb.OleDbCommandBuilder(objDA)
objDA.Fill(objds, "makemast")
objRow = objds.Tables(0).NewRow
objRow("makecd") = UCase(Trim(Text1.Text))
objRow("makename") = UCase(Trim(Text2.Text))
objds.Tables("makemast").Rows.Add(objRow)
objDA.Update(objds, "makemast")
MsgBox("Inserted")
So I want to update the data using above dataset,help me regarding this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|