for adodc to connect oracle and create reports
for adodc to connect oracle and create reports
API Declarations
Dim rs As New ADODB.Recordset
Rate for adodc to connect oracle and create reports
(2(2 Vote))
rs.MoveFirst
disp
End Sub
Private Sub cmdnext_Click()
'set rs = cn.Execute "select * from student"
rs.MoveNext
If rs.EOF Then
rs.MoveFirst
End If
disp
End Sub
Private Sub cmdprv_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveLast
End If
disp
End Sub
Private Sub Command1_Click()
txtname.Text = " "
txtno.Text = " "
txtm1.Text = " "
txtm2.Text = " "
txtm3.Text = " "
End Sub
Private Sub Command2_Click()
If txtname.Text = "" Or txtno.Text = "" Or txtm1.Text = " " Or txtm2.Text = " " Or txtm3.Text = " " Then
MsgBox "please enter all the field appropiate"
Else
cn.Execute "insert into student(name,rollno,m1,m2,m3) values('" & txtname.Text & " ', " & Val(txtno.Text) & "," & Val(txtm1.Text) & "," & Val(txtm2.Text) & "," & Val(txtm3.Text) & ")"
txtname.Text = " "
txtno.Text = " "
txtm1.Text = " "
txtm2.Text = " "
txtm3.Text = " "
Set rs = cn.Execute("select * from student")
End If
End Sub
Private Sub Command3_Click()
DataReport1.Show
End Sub
Private Sub Form_Load()
cn.Open "dsn=bhavesh;uid=scott;pwd=tiger"
rs.Open "select * from student", cn, adOpenDynamic
disp
End Sub
Public Sub disp()
txtname.Text = rs("name")
txtno.Text = rs("rollno")
txtm1.Text = rs("m1")
txtm2.Text = rs("m2")
txtm3.Text = rs("m3")
End Sub
for adodc to connect oracle and create reports Comments
No comments yet — be the first to post one!
Post a Comment