CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    URGENT - SQL Query in DataEnvironment

    Subject Urgent - DataReport / DataEnvironment
    Category Database
    Posted by HanneSThEGreaT on 9/25/01 at 07:36 pm
    Rating not rated


    Hello.
    I created a Data Environment, included the fields I want to print on the Data Report. I used an SQL statement to retreive the fields to print, as one would normally do. My question is: how can I modify that SQL statement to print (Example)all the payments which is less than $100, instead of All the payments?
    If this question is unclear please let me know
    Please help this is very urgent
    Thanx




    F. T. W.

  2. #2
    Join Date
    Feb 2000
    Posts
    440

    Re: URGENT - SQL Query in DataEnvironment

    Is your question concerning how to write the quiery if so then it is very simple:

    "Select * from MyTable where Payment < 100 "


    Valery Iskarov Nikolov
    Software Dynamics

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: URGENT - SQL Query in DataEnvironment

    Hello vin, thanx for the help. I've got a few question though.
    1) Where do I have to put this in? In the DataEnvironment itself?
    2)
    What if I want the user to select the amount they want to print(Example) less than 200, or = 200?

    Thanx

    F. T. W.

  4. #4
    Join Date
    Feb 2000
    Posts
    440

    Re: URGENT - SQL Query in DataEnvironment

    I am not very familliar with DataEnvironment kind of projects, but generally you have to choose command type to be "adCmdText" and in the text property you should supply your sql query. If you want to change it at run time you can do it by changing the text property value like this

    DataEnvironment1.Commands(1).CommandText = "Select * from MyTable Where MyMoney < 100"




    Valery Iskarov Nikolov
    Software Dynamics

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

Featured