Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First time, SQL X 2!
Message
From
14/05/2005 14:44:24
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
First time, SQL X 2!
Miscellaneous
Thread ID:
01014250
Message ID:
01014250
Views:
60
Hey guyz/girlz!

I am back on the threads after a month of holiday!!! Seems like it make 1 year I didn't code anything!!!

I am still on a bug with ADO data control.... Part of it is fixed, another part I can't understand...

A form named frmCustomers contain my customers informations and a command button let me create work orders, another one let me acces the entire list of the work orders of the customer.... On frmCustomer, I have a field containing the amount of work orders for the customer, it is the result of a SQL query sent to frmCustomers.dtWorkOrders....

in frmCreateWorkOrders, I am using this line to initialize my ADOdc :

Set dtWorkOrders.RecordSet = frmCustomers.dtWorkOrders.RecordSet

when I close the frmCreateWorkOrders window I am using this line :

Set frmCustomers.dtWorkOrders.RecordSet = dtWorkOrders.RecordSet
Then I refresh my frmCustomers.dtWorkOrders ADOdc, informations are up to date, everything is ok...


BUT.. look my troubleshooting step, this is where it became weird...

1ST TEST:
Start program in IDE
Look up customer #1 file
Create a work order
Update information on customer file (can see work orders are + 1 in the work order total field)
Open to see list of work orders
dtWorkOrders.RecordSet.RecordCount = 0
Close frmSeeWorkOrders
Reopen frmSeeWorkOrder
dtWorkOrders.RecordSet.RecordCount = 1, and the informations are good for the work order...

Then..

Look up customer #2 file
Create a work order
Update information on customer file (can see work orders are + 1 in the work order total field)
Open to see list of work orders
dtWorkOrders.RecordSet.RecordCount = 1

2ND TEST
Start program in IDE
Look up customer #1 file
Create a work order
Update information on customer file (can see work orders are + 1 in the work order total field)
Look up customer #2 file
Create a work order
Update information on customer file (can see work orders are + 1 in the work order total field)
Open to see list of work orders
dtWorkOrders.RecordSet.RecordCount = 0
Close frmSeeWorkOrders
Reopen frmSeeWorkOrder
dtWorkOrders.RecordSet.RecordCount = 1, and the informations are good for the work order...

Then

Look up customer #3 file
Create a work order
Update information on customer file (can see work orders are + 1 in the work order total field)
Open to see list of work orders
dtWorkOrders.RecordSet.RecordCount = 1

Line used to init dtWorkOrders in frmSeeWorkOrders :

Set dtWorkOrders.RecordSet = frmCustomers.dtWorkOrders.RecordSet
dtWorkOrders.RecordSource = "Select * From workorders Where customer_id="' customer_id$ '" Order By dDate DESC ;"
dtWorkOrders.Refresh

I also tried without the .RecourdSource line...

So.. it seems that the first time ever I am trying to access work orders list, just after I start the program in IDE, frmSeeWorkOrders.dtWorkOrders is not able to catch infos from frmCustomers.dtWorkOrders..

Anyone understand something about that bug ? Is that a Bug??

I am using VS 6.0 SP6, full patched/updated!

Thanks!

Yannick L
Next
Reply
Map
View

Click here to load this message in the networking platform