VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



for adodc to connect oracle and create reports

by Bhavesh (1 Submission)
Category: OLE/COM/DCOM/Active-X
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 5th July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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



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



Download this snippet    Add to My Saved Code

for adodc to connect oracle and create reports Comments

No comments have been posted about for adodc to connect oracle and create reports. Why not be the first to post a comment about for adodc to connect oracle and create reports.

Post your comment

Subject:
Message:
0/1000 characters