|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DAO, SQL Server 2005, and VB6I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access
an access 2000 database. In this app, Access is used soley for data storage - there is no UI component. I have converted the database to SQL Server 2005. Can I use DAO to access the new SQL Server database, or must I change all the DAO calls to ADO? I would like to rewrite as little code as possible. Thanks, Marcus "Marcus" <holysmoke***@hotmail.com> wrote in message Basically, yes. DAO can access ODBC, through which you can access SQL news:1156796811.984042.247550@p79g2000cwp.googlegroups.com... >I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access > an access 2000 database. In this app, Access is used soley for data > storage - there is no UI component. I have converted the database to > SQL Server 2005. Can I use DAO to access the new SQL Server database, > or must I change all the DAO calls to ADO? I would like to rewrite as > little code as possible. > Server. Using an Access Database with all the local tables replaced with ODBC linked tables is an easy way to do this. David You can use interop to reference the DAO.dll.
Marcus wrote: Show quote > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access > an access 2000 database. In this app, Access is used soley for data > storage - there is no UI component. I have converted the database to > SQL Server 2005. Can I use DAO to access the new SQL Server database, > or must I change all the DAO calls to ADO? I would like to rewrite as > little code as possible. > > Thanks, > Marcus > I am writing the code in VB6, not VB.Net. I don't think interop comes
into this, does it? Theo Verweij wrote: Show quote > You can use interop to reference the DAO.dll. > > Marcus wrote: > > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access > > an access 2000 database. In this app, Access is used soley for data > > storage - there is no UI component. I have converted the database to > > SQL Server 2005. Can I use DAO to access the new SQL Server database, > > or must I change all the DAO calls to ADO? I would like to rewrite as > > little code as possible. > > > > Thanks, > > Marcus > > It doesn't, but this is a newsgroup for .NET, so we assumed you wanted DAO
in that environment. Show quote "Marcus" <holysmoke***@hotmail.com> wrote in message news:1156800129.978786.271880@p79g2000cwp.googlegroups.com... >I am writing the code in VB6, not VB.Net. I don't think interop comes > into this, does it? > > > Theo Verweij wrote: >> You can use interop to reference the DAO.dll. >> >> Marcus wrote: >> > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access >> > an access 2000 database. In this app, Access is used soley for data >> > storage - there is no UI component. I have converted the database to >> > SQL Server 2005. Can I use DAO to access the new SQL Server database, >> > or must I change all the DAO calls to ADO? I would like to rewrite as >> > little code as possible. >> > >> > Thanks, >> > Marcus >> > > If you are using VB6, then you'll want to rewrite using ADO. When you
use DAO, you're loading the Jet engine, which you don't need if there's no Access UI involved. --Mary Show quote On 28 Aug 2006 14:22:10 -0700, "Marcus" <holysmoke***@hotmail.com> wrote: >I am writing the code in VB6, not VB.Net. I don't think interop comes >into this, does it? > > >Theo Verweij wrote: >> You can use interop to reference the DAO.dll. >> >> Marcus wrote: >> > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to access >> > an access 2000 database. In this app, Access is used soley for data >> > storage - there is no UI component. I have converted the database to >> > SQL Server 2005. Can I use DAO to access the new SQL Server database, >> > or must I change all the DAO calls to ADO? I would like to rewrite as >> > little code as possible. >> > >> > Thanks, >> > Marcus >> > I was under the impression though, that for Access DAO could actually
perform better than with ADO. Show quote "Mary Chipman [MSFT]" <mc***@online.microsoft.com> wrote in message news:s1qof2tv0rkjpnevq9gnj6vun6665hfhb5@4ax.com... > If you are using VB6, then you'll want to rewrite using ADO. When you > use DAO, you're loading the Jet engine, which you don't need if > there's no Access UI involved. > > --Mary > > On 28 Aug 2006 14:22:10 -0700, "Marcus" <holysmoke***@hotmail.com> > wrote: > >>I am writing the code in VB6, not VB.Net. I don't think interop comes >>into this, does it? >> >> >>Theo Verweij wrote: >>> You can use interop to reference the DAO.dll. >>> >>> Marcus wrote: >>> > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to >>> > access >>> > an access 2000 database. In this app, Access is used soley for data >>> > storage - there is no UI component. I have converted the database to >>> > SQL Server 2005. Can I use DAO to access the new SQL Server database, >>> > or must I change all the DAO calls to ADO? I would like to rewrite as >>> > little code as possible. >>> > >>> > Thanks, >>> > Marcus >>> > Yup, but at a cost. Check the archives for details on the frailties and
foibles associated with JET. -- Show quote____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ "Scott M." <s-mar@nospam.nospam> wrote in message news:O38Di5E0GHA.3656@TK2MSFTNGP04.phx.gbl... >I was under the impression though, that for Access DAO could actually >perform better than with ADO. > > > "Mary Chipman [MSFT]" <mc***@online.microsoft.com> wrote in message > news:s1qof2tv0rkjpnevq9gnj6vun6665hfhb5@4ax.com... >> If you are using VB6, then you'll want to rewrite using ADO. When you >> use DAO, you're loading the Jet engine, which you don't need if >> there's no Access UI involved. >> >> --Mary >> >> On 28 Aug 2006 14:22:10 -0700, "Marcus" <holysmoke***@hotmail.com> >> wrote: >> >>>I am writing the code in VB6, not VB.Net. I don't think interop comes >>>into this, does it? >>> >>> >>>Theo Verweij wrote: >>>> You can use interop to reference the DAO.dll. >>>> >>>> Marcus wrote: >>>> > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to >>>> > access >>>> > an access 2000 database. In this app, Access is used soley for data >>>> > storage - there is no UI component. I have converted the database to >>>> > SQL Server 2005. Can I use DAO to access the new SQL Server database, >>>> > or must I change all the DAO calls to ADO? I would like to rewrite as >>>> > little code as possible. >>>> > >>>> > Thanks, >>>> > Marcus >>>> > > > Yes, you are correct -- when you're using *Jet*, not Access. It's
important to differentiate between the Jet engine and the Access UI (msaccess.exe). In your case, you're not moving from Access/Jet to SQL Server with the intent of still using the Access UI, you're moving from the VB6/Jet to SQL Server. If you were going to use Access as a front-end, you'd be loading Jet regardless, so using DAO when talking to Jet engine components on the client (like querydefs) is faster. But if you're not using the Access UI, then DAO code is just dead weight -- use ADO or ADO.NET. --Mary Show quote On Mon, 4 Sep 2006 14:20:53 -0400, "Scott M." <s-mar@nospam.nospam> wrote: >I was under the impression though, that for Access DAO could actually >perform better than with ADO. > > >"Mary Chipman [MSFT]" <mc***@online.microsoft.com> wrote in message >news:s1qof2tv0rkjpnevq9gnj6vun6665hfhb5@4ax.com... >> If you are using VB6, then you'll want to rewrite using ADO. When you >> use DAO, you're loading the Jet engine, which you don't need if >> there's no Access UI involved. >> >> --Mary >> >> On 28 Aug 2006 14:22:10 -0700, "Marcus" <holysmoke***@hotmail.com> >> wrote: >> >>>I am writing the code in VB6, not VB.Net. I don't think interop comes >>>into this, does it? >>> >>> >>>Theo Verweij wrote: >>>> You can use interop to reference the DAO.dll. >>>> >>>> Marcus wrote: >>>> > I have some legacy VB6 code that uses DAO (Microsoft DAO 3.6) to >>>> > access >>>> > an access 2000 database. In this app, Access is used soley for data >>>> > storage - there is no UI component. I have converted the database to >>>> > SQL Server 2005. Can I use DAO to access the new SQL Server database, >>>> > or must I change all the DAO calls to ADO? I would like to rewrite as >>>> > little code as possible. >>>> > >>>> > Thanks, >>>> > Marcus >>>> > > |
|||||||||||||||||||||||