|
-
Jul 1st, 2008, 10:49 PM
#1
Thread Starter
New Member
help on DAO to ADO conversion
this code below using a DAO connection library
Data1.Refresh
If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.Edit
Data1.Recordset("RYC") = rsData!COMM
Data1.Recordset.Update
End If
i want this to convert to ADO conncection library, please any one advice me how to do it. i had try this query "con.execute Update table set field1 =field2 where field3>1" it works but i want to update only a single row not all the records contained in field3.
please help tnx
mnar0930
-
Jul 1st, 2008, 11:07 PM
#2
Re: help on DAO to ADO conversion
Query isn't working because you are not referencing the primary/unique key in the WHERE clause.
-
Jul 2nd, 2008, 12:02 AM
#3
Thread Starter
New Member
Re: help on DAO to ADO conversion
there no unique id that can idetify the certain records, is theres a way on how to update it?
-
Jul 2nd, 2008, 02:10 AM
#4
Re: help on DAO to ADO conversion
Consider database re-architecture as early as possible, make it a habit to provide primary keys for all records.
Data Control has an ADO counterpart. Check the components list.
-
Jul 2nd, 2008, 08:31 AM
#5
Re: help on DAO to ADO conversion
I'd recommend looking at the ADO Tutorial link in my signature - it is an ADO code equivalent of the situation where you would use a data control, but as it is code you have full control of what happens, and can easily extend/limit it as you want.
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
|