Imports System.Data Imports System.Data.Odbc Partial Class _STUDENTTABLE Inherits System.Web.UI.Page Dim CON As OdbcConnection Dim comm As OdbcCommand Dim instance As OdbcDataAdapter Dim a As Integer Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub BTNINSERT_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNINSERT.Click CON = New OdbcConnection("DSN=DBLOG;Driver=(Oracle in XE);UID=system;PWD=SYS;SERVER=localhost;") CON.Open() MsgBox("successfully opened") comm = New OdbcCommand("INSERTSTUDENT", CON) comm.CommandType = CommandType.StoredProcedure comm.Parameters.AddWithValue("ID_", TXTID.Text) comm.Parameters.AddWithValue("STUDENTNAME_", TXTNAME.Text) comm.Parameters.AddWithValue("DEPARTMENT_", TXTDEPART.Text) comm.Parameters.AddWithValue("YEAR_", TXTYEAR.Text) comm = New OdbcCommand("{call INSERTSTUDENT(_,_,_,_}", CON) a = comm.ExecuteNonQuery() If a > 0 Then MsgBox("success") Else MsgBox("fail") End If CON.Close() MsgBox("successfully closed") End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)