Results 1 to 3 of 3

Thread: how to set paramaters to data report for sql statement

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    4

    how to set paramaters to data report for sql statement

    hi!
    actaully i have a MDI project which makes bills ...so i set up an sql statement for the datareport which is my bill ,where in ,i am passing "billno"(which is char type) as a parameter..i put the following statement in the sql builder
    select * from billheader where billno= ?
    but in the parameters tab it shows "param1" as a parameter and not "?" ...pls help!

    Secondly as i was suggested by u all in order to refresh the bill to the latest data input (datareport)..i added the followng code in the save button code in the mdi form:

    (command "bill" is divided in to two parts "billlheader" which is the parent command and "billdetails" which is the child command,both have a relation of one to many via "billno")

    Private Sub cmdButtonName_Click()
    On Error Resume Next
    3)If DataEnvironment1.rsbill.State = adStateOpen Then
    DataEnvironment1.rsbill.Close
    End If
    DataEnvironment1.bill Text6.text
    bill.Refresh
    bill.Show (vbModal)
    Unload bill
    End Sub

    but this code shows "application error or object error" at line no 3.
    pls help!!

  2. #2
    nullus
    Guest
    uhh....i just answered your first question, why post the thread twice?

  3. #3
    nullus
    Guest
    3 times even!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width