  | | | VB6 using DAO | VB6 using DAO 2006-03-24 - By Jon Riesenweber
Back Hello,
I?m a newbie to this compiled code world so go easy on me. I am trying to convert an app to MySQL from exchange using DAO. I know that ADO is far better for this situation, however I have to do it with DAO before they will let me convert the entire thing over to ADO. I have done most of the converting but I am stuck on the SEEK method. I am trying to replace the Seek method with findFirst but the logic is screwing me up right now. Here?s the call I am trying to replace. CurDataTbl.Seek "=", DispCtl("UnitCtlNo"), DispCtl( "DataFieldNo" and SensorTbl.Seek "=", DispCtl("Sensor"). Here is what all of that is defined as.
For the first:
Set CurDataTbl = DB.OpenRecordset("CurData", dbOpenDynaset) 'CurDataTbl = Table for detail data (Data table)
Set DispCtl = DB.OpenRecordset("SELECT * FROM DisplayCtl WHERE UnitCtlNo = " & UnitCtlfld & " And (AveragedField = True Or TotaledField = True Or CurrentIsHistory = True Or DataEntryField = True)", dbOpenDynaset)
And for the second call:
Set SensorTbl = DB.OpenRecordset("Sensor", dbOpenDynaset) 'SensorTbl = Table for Sensor data (Sensor table)
Set DispCtl = DB.OpenRecordset("SELECT * FROM DisplayCtl WHERE UnitCtlNo = " & UnitCtlfld & " And (AveragedField = True Or TotaledField = True Or CurrentIsHistory = True Or DataEntryField = True)", dbOpenDynaset)
PLEASE HELP!!!
Thanks!
Jon
-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
|
|
 |