Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO vs ADO 2

Status
Not open for further replies.

Bigtnmd

Programmer
May 30, 2000
2
0
0
US
Visit site
I have had a couple of people tell me that I cannot use DAO with Access 2000, and that I must use ADO.  No one can tell me why.  All my training has been in DAO.  
 
Bigfoot,
Are you sure that the service pack is specifically for VB and not the NT service pack 5? Personally, I have not gone beyond service pack 3 for Visual Studio, but I am running service pack 5 for NT. - Jeff Marler
 
Nope. Go to Microsoft's main page and search for VB SP4. There you will find a link to SP5 and what it fixes.
I'm downloading it now - it's 58 MB.

I don't know if I'm installing it or not, but I want to have it in case I need it.

-Gary They never have to knock if your door is always open.
 
You're right . . . I knew the SP4 was out (the company I worked for did not want to go to it), but I did not know about SP5. I read through the list on enhancements/changes and the only real data access automatic upgrades are for ADO (ADO is automatically upgraded to version 2.5)
You may want to be aware of this though (I copied/pasted this from their site)


Service Pack 5 does not automatically update Microsoft Data Access Components (MDAC) to version 2.6. If you install MDAC 2.6 from the CD, you should also update MDAC_TYP.EXE in the VB98\Wizards\PDWizard\Redist directory to ensure that the correct version will be distributed.

- Jeff Marler
 
I don't think I want to upgrade just yet. I'm going to cancel my d/l and wait it out. My version is working fine.

I'm changing some of my code to ADO, so I'm waiting. They never have to knock if your door is always open.
 
I Switched mine over from an Access 97 database to a Access 2000, just had to change the Reference to DAO36 object

Only problem I've had is I've had a computer that disconnects during write operations and corupts the database and I use to be able to repair it with Access 97, now with Access 2000 the password gets damaged and Ican not get into it to repair it. I'm going to re-write it to ADO this summer.
 
Hello!

DAO is not compliant with Access 2000-databases.

The "intrinsic datacontrol" (Data1) won´t work with Access 2000. You need the SP4 or later for VB6.

/Perra
 
Personally, I wouldn't recommend using datacontrols anyways . . . they tend to lead to bad performance. - Jeff Marler
(please note, that the page is under construction)
 
Why? I just started using them.

-G They never have to knock if your door is always open.
 
I upgraded one of the software developed in VB (4.0) from DAO to RDO the problem I am facing is after extracting more that 20 records I am getting max no open cursor exceded I increased OPEN_CURSOR parameter in back end , I am also closing all my result set after use .
 
Hi
May be iam in wrong side of the forum but its something related to it.
Inventory Project using DAO & accesss running well, Now migratingto SQl server .
It it possbile to use same DAO to connect to sql server
Or i have to create ADO.

If its ADO how to deal with workspaces that are usedin DAO.

/-M
 
Possible: Yes!

The easiest and best way: Use a front end MDB with linked tables to the server tables. This way you will not have to change a lot of code and can leave most the same as before.

Recommended: No! [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
DAO works great with Access 2000
here is how to use it.

You must reference Microsoft DAO 3.6 Object Library
Hint: From the menu bar click Project
from the drop box click References
then click iin The DAO object

Place in a module -----------------------

Public Const c_DBPassword As String = "xxxxx"
Public Const c_DAOconnector As String = "MS Access;PWD=" & c_DBPassword


Global the_query_def As dao.QueryDef
Global the_db As dao.Database
Global the_rs As dao.Recordset
---------------------------------------------------


This is a bit of code working for a year or more.

Public Sub load_by_combo()

Dim q As String

'sales person combo load
cmbBy.Clear

q = "SELECT "
q = q & "Cid, "
q = q & "Key, "
q = q & "Info "

q = q & "From Combos_misc "
q = q & "WHERE Key = 'Sales_person' "

Set the_db = OpenDatabase(v_PathData & v_DBname, False, False, c_DAOconnector)
Set the_rs = the_db.OpenRecordset(q, dbOpenDynaset, dbReadOnly)

While Not the_rs.EOF
cmbBy.AddItem the_rs("Info")
cmbBy.ItemData(cmbBy.NewIndex) = the_rs("CID")

the_rs.MoveNext

Wend

the_rs.Close
the_db.Close

End Sub

Luck Tom
 
If you can't find a late enough version of the Access Driver (I use 4.0 and it works fine with access 2000) you might be able to trick it by using the OLE DB driver for ODBC drivers. I couldn't test this because it won't let me use any but the latest, and I don't want to unregister it.

Bob
 

>you might be able to trick it by using the OLE DB driver for ODBC drivers

BobRodes , would you please explain just what you mean here?
 
I'm afraid I haven't a clue! Sorry, it must have been very late at night.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top