-
October 16th, 2009, 07:32 AM
#1
Data mismatch error in data report
i know thr hv been loadsa threads on this one..n i've read almost all..but this s still takin d life outta me!
i have a table in oracle called Guest_Group which contains lotsa fields outta which i am accessing 4 using this code :
Public Sub Rep(X As Integer)
Set rsRep = New ADODB.Recordset
With rsRep
.ActiveConnection = cnn
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open "select GrpName, RSVP, Adults, Children from Guest_Group where Party_ID=" & X
End With
End Sub
here Adults and Children r of datatype Number.
i display these in a data report n try t use a sum function t display total no. of adults and total no. of children (separately). dats wen d bugger shows d error!!!
Call Rep(val(frmMain.txtPID.Text))
With rptGuest
Set .DataSource = rsRep
.DataMember = rsRep.DataMember
.Sections("Section5").Controls("lblRecCount").Caption = rsRep.RecordCount
.Show
.WindowState = 2
End With
PLEASE HELP!!!
-
October 16th, 2009, 08:15 PM
#2
Re: Data mismatch error in data report
Originally Posted by KetkiNavale
i know thr hv been loadsa threads on this one..n i've read almost all..but this s still takin d life outta me!
i have a table in oracle called Guest_Group which contains lotsa fields outta which i am accessing 4 using this code :
Public Sub Rep(X As Integer)
Set rsRep = New ADODB.Recordset
With rsRep
.ActiveConnection = cnn
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open "select GrpName, RSVP, Adults, Children from Guest_Group where Party_ID=" & X
End With
End Sub
here Adults and Children r of datatype Number.
i display these in a data report n try t use a sum function t display total no. of adults and total no. of children (separately). dats wen d bugger shows d error!!!
Call Rep(val(frmMain.txtPID.Text))
With rptGuest
Set .DataSource = rsRep
.DataMember = rsRep.DataMember
.Sections("Section5").Controls("lblRecCount").Caption = rsRep.RecordCount
.Show
.WindowState = 2
End With
PLEASE HELP!!!
uhmmmm, on code line is showed error???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|