
VB6 Data Enviroments to Data Reports w/ SP's
I have 3 tables... Customers, Product, ProductHistory. Using ADO Datagrid I
select a Customer and execute a DataEnviroment to populate a Customer Report
listing current products owned... Command1 = Stored Procedure "Select * from
Customers where
CustomerID = "Variable"
The Child Command uses "Table" relation to Parent by CustomerID.
SPCustomer =
(grdDataGrid.Columns("CustomerID").CellValue(HistoryGrid.Bookmark))
Dim D As New DataEnvironment1
D.Command1 (SPCustomer)
Easy! Now I want to do the same thing except populate a report of products
owned by a customer on a certain date. It would seem like the same procedure
except...
Using 2 Stored Procedures I cant pass variables to the Child Command
So I wrote the SP like this...
AS
Update Customers
Select * From Customers
GO
Then related the Product History "Table" not the "SP" to Date & CustomerID.
This Returns Data if I leave the Child command Off but when I add the child
command No Data is returned. I think this is because of the date conversions
from VB to ADO to SQL.
(VB As Date, ADO As DBTimeStamp, SQL As varchar) This is the only way I was
able to get the parameter to the SQL Query, even in a simple scenario.
Whats up w/ using the Data Environments w/ Data Reports they are very
specific where you put the results.
Soory for all the Data but, AnyOne?? AnyOne??