OK..this has been troubling me since quite few days..
Im not able to connect from VB.NET 2005 to oracle content...:S
In VB 6.0 i used adodb to connect oracle 9i as backend .. no issues then..
consider the following code..( in vb 6.0 )
--------------------------------------------------------------------------\Dim
(general declarations)
Dim d As New ADODB.Connection
Dim r As New ADODB.Recordset
Private Sub as_Change()
End Sub
Private Sub Command1_Click()
If text1.Text = r(0) And Text2.Text = r(1) Then
MsgBox("Data connected successfully...")
Else
MsgBox("Information entered is wrong,Please enter correctly", vbCritical, "Error")
End If
End Sub
(form load)
Private Sub Form_Load()
Set d = New ADODB.Connection
Set r = New ADODB.Recordset
d.Open "girish", "scott", "tiger"
r.Open "select * from vidlogin", d, adOpenKeyset, adLockPessimistic
End Sub
-----------------------------------------------------------------
& i tried similar coding in vb.net 2005...& damn it...even this simple POS thing wont work..
following is my code in .net 2005..please spot the error & help me please please
(added reference of adodb to the project)
-----------------------------------------------------------------
(form1 declarations) .. ( i coudnt find general declarations...:S)
Public Class Form1
Dim d As New ADODB.Connection
Dim r As New ADODB.Recordset
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If (Text1.Text = r(0) And Text2.Text = r(1)) Then
MsgBox("success....connected..
")
End If
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
(form1 --- > new) .. (coudnt find form --> load
)
Public Sub New()
d = New ADODB.Connection
r = New ADODB.Recordset
d.Open("girish", "scott", "tiger")
r.Open("select * from vidlogin", d, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockPessimistic)
MsgBox("connection success")
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
End Class
-----------------------------------------------------------------
Please tell me where i have to change what..or please write me the equivalent script that will work in vb.net 2005..
girish -- > odbc connection for oracle
vidlogin --> table name in oracle with useid scott & pass tiger.
only 2 fields in the table ..
Regards,
SS
Im not able to connect from VB.NET 2005 to oracle content...:S
In VB 6.0 i used adodb to connect oracle 9i as backend .. no issues then..
consider the following code..( in vb 6.0 )
--------------------------------------------------------------------------\Dim
(general declarations)
Dim d As New ADODB.Connection
Dim r As New ADODB.Recordset
Private Sub as_Change()
End Sub
Private Sub Command1_Click()
If text1.Text = r(0) And Text2.Text = r(1) Then
MsgBox("Data connected successfully...")
Else
MsgBox("Information entered is wrong,Please enter correctly", vbCritical, "Error")
End If
End Sub
(form load)
Private Sub Form_Load()
Set d = New ADODB.Connection
Set r = New ADODB.Recordset
d.Open "girish", "scott", "tiger"
r.Open "select * from vidlogin", d, adOpenKeyset, adLockPessimistic
End Sub
-----------------------------------------------------------------
& i tried similar coding in vb.net 2005...& damn it...even this simple POS thing wont work..
following is my code in .net 2005..please spot the error & help me please please
(added reference of adodb to the project)
-----------------------------------------------------------------
(form1 declarations) .. ( i coudnt find general declarations...:S)
Public Class Form1
Dim d As New ADODB.Connection
Dim r As New ADODB.Recordset
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If (Text1.Text = r(0) And Text2.Text = r(1)) Then
MsgBox("success....connected..

End If
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
(form1 --- > new) .. (coudnt find form --> load

Public Sub New()
d = New ADODB.Connection
r = New ADODB.Recordset
d.Open("girish", "scott", "tiger")
r.Open("select * from vidlogin", d, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockPessimistic)
MsgBox("connection success")
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
End Class
-----------------------------------------------------------------
Please tell me where i have to change what..or please write me the equivalent script that will work in vb.net 2005..

girish -- > odbc connection for oracle
vidlogin --> table name in oracle with useid scott & pass tiger.
only 2 fields in the table ..

Regards,
SS