|
-
Jul 1st, 2003, 02:12 AM
#1
Thread Starter
Addicted Member
How to pass value to SQL Query in Data Environment's Command Object at run-time?
In DataEnvironment I have a Command Object in which I have
given following SQL Query:
-------------------------
SELECT * FROM customer WHERE billno = billnumber
-------------------------
Here billnumber is a public variable in Module.
This variable accepts value at run-time.
How to call variable in DataEnvironment's SQL Query?
-
May 24th, 2013, 04:16 AM
#2
Registered User
Re: How to pass value to SQL Query in Data Environment's Command Object at run-time?
 Originally Posted by rpk_20061975
In DataEnvironment I have a Command Object in which I have
given following SQL Query:
-------------------------
SELECT * FROM customer WHERE billno = billnumber
-------------------------
Here billnumber is a public variable in Module.
This variable accepts value at run-time.
How to call variable in DataEnvironment's SQL Query?
Hi,
You can follow the below commands for (VB 6): Just try calling the below function by placing under a command button in any of the form from where you want to call the datareport.
Note:
Also goto DataEnvironment1 -> Connection1 -> ADD a Command1 and rename the Command1 as customer. Now goto customer properties -> In General tab select SQL Statement and type in...... SELECT * FROM Customer WHERE billno=?
Private sub Comman1_Click()
Load DataEnvironment1
With DataEnvironment1
If .rscustomer.State <> 0 Then .rscustomer.Close
.customer (billnumber)
End With
Datareport1.Refresh
If Datareport1.Visible = False Then Datareport1.Show
End Sub
Enjoy!
Buzz me if it works !!!
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
|