|
-
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?
-
May 3rd, 2003, 07:57 AM
#2
Frenzied Member
Are you getting any errors? Looking over the code, that seems about right.
Dont gain the world and lose your soul
-
May 3rd, 2003, 12:23 PM
#3
We cant help you if you dont answer back to questions asked of you. You have already asked this once, and you never responded to my question. And emailing me with the same exact vague post is also not going to get you an answer.
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
|