Results 1 to 4 of 4

Thread: how to use 2 parameters in data environment?

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    20

    how to use 2 parameters in data environment?

    I have the public category as strings which is determined by the dropdown value and I also have txtchoice.text as search field.
    Now i made a data environment -> data report. I created command1 and used the sql
    Code:
    select * from table where variable1 = variable2
    In my frmsearch, I have the following code for 'print search result':
    Code:
    Dim x As String
    x = category
    If (DataEnvironment1.rsCommand2.State = 1) Then
            DataEnvironment1.rsCommand2.Close
        Else
            DataEnvironment1.Command2 x, txtchoice.text
            Load DataReport2
            DataReport2.Show
    End If
    this gives me empty output.
    ===
    I've tried to change the command string to
    Code:
    select * from table where name = variable1
    and in my print button:
    Code:
    If (DataEnvironment1.rsCommand2.State = 1) Then
            DataEnvironment1.rsCommand2.Close
        Else
            DataEnvironment1.Command2 (txtchoice.text)
            Load DataReport2
            DataReport2.Show
    End If
    This gives me the correct output but I need the "where" parameter to be dynamic

    Maybe I have wrong format for 2 parameters in the DataEnvironment1.Command2?
    Last edited by cherrydee; Oct 25th, 2016 at 12:59 AM.

Tags for this Thread

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