Hi guys,
I am currently trying to fix a VB6 application. One of the main issues is that log data was being written to text files rather than the database.
I am therefore changing the application to write these log entries to the existing access db.
Unfortunately, as I am more used to .net programming (e.g. ado.net) I am having problems trying to get the log data back out of the database. The existing programmer used DAO and typed recordsets so I am not sure how I can then query these using SQL
For example:
My problem is that i need to pull out the data for a specific date i.e.
Sure I could create another dataset to accomplish this, but is there a way to use the existing one? I tried using the recordset.filter property but this failed to work, plus I dont want to extract all the data then filter it.
Unfortunately as the main parts of the db are still using DAO I cant really change it to ADO.
Any help would be much appreciated.
Ben
I am currently trying to fix a VB6 application. One of the main issues is that log data was being written to text files rather than the database.
I am therefore changing the application to write these log entries to the existing access db.
Unfortunately, as I am more used to .net programming (e.g. ado.net) I am having problems trying to get the log data back out of the database. The existing programmer used DAO and typed recordsets so I am not sure how I can then query these using SQL
For example:
Code:
Set db = OpenDatabase(App.Path & "mydatabase.mdb")
Set rs = db.OpenRecordSet("mytable")
'populate list box with data items"
rs.Movefirst
While Not rs.EOF
ListBox1.AddItem rs("Field1") & " : " & rs(Field2)
rs.MoveNext
Wend
My problem is that i need to pull out the data for a specific date i.e.
Code:
"select * from mytable where field1 =" & Now()
Sure I could create another dataset to accomplish this, but is there a way to use the existing one? I tried using the recordset.filter property but this failed to work, plus I dont want to extract all the data then filter it.
Unfortunately as the main parts of the db are still using DAO I cant really change it to ADO.
Any help would be much appreciated.
Ben