Adam ErstelleRank #2,988 · 476 pointsPosted Apr 15, 2004, 9:24 AM EDT
0
Create a connection object with the proper connection string to your Oracle database. Create a command object from the connection object. Create a command (I use commandtext and SQL) and execute the command object's ExecuteNonQuery method.
tewarianand11 pointsPosted Apr 20, 2004, 2:02 AM EDT
0
I am giving small code for inserting data into oracle database : You should change the values of data source, user id, password. For example here i take a Student table with two fields Rno and Name dim Con As OleDb.OleDbConnection dim Qry as string Con = New OleDb.OleDbConnection("Provider=MSDAORA; Data Source = xdpi; User Id = data_sys; Password = validation") Con.Open() Qry = "Insert Into Student(Rno, Name) Values (" & Val(TxtRNo.Text) & ",'" & Trim(TxtName.Text) & "')" Dim Cmd As New OleDb.OleDbCommand(Qry, Con) Cmd.ExecuteNonQuery()
Adam ErstelleRank #2,988 · 476 pointsPosted Apr 15, 2004, 9:24 AM EDT
tewarianand11 pointsPosted Apr 20, 2004, 2:02 AM EDT