I'm looking at converting DAO to ADO in my app. All of my DAO connections
are of the following structure:
Dim wsName As DAO.Workspace
Dim dbName As DAO.Database
Dim rsName As DAO.Recordset
Set wsName = DBEngine.Worksp aces(0)
Set dbName = wsName.OpenData base(CurrentPro ject.FullName)
Set rsName = dbName.OpenReco rdset("SQL Statement")
I'm a real newbie with ADO and don't feel at all comfortable with it. Now to
convert to ADO, something like:
Dim cnnName As New ADODB.Connectio n
Dim rsName As New ADODB.Recordset
and here's where I start to get confused:
Set cnnName = Application.Cur rentProject.Con nection????
rsName.Open "SQL Statement" ????
Since I have several hundred of these DAO constructs, I'm trying to figure
out if there is a way I could write code to accomplish the conversion.
Thanks for any help.
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200602/1 32 12515
Robert, can I ask the reason for converting to ADO?
DAO is the native Access library. The A in DAO *is* Access, and it is the
library Access itself uses in the interface, so why would you want to
change?
Microsoft was pushing ADO about 5 years ago, as a more generic library
(suitable for things wider than Access), but it is now dead, replaced by the
very different ADO.NET. There is therefore now no point in doing this just
to learn ADO, no point at all in doing it for an Access application, and no
point at all at all in doing it for an existing Access application.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"robert d via AccessMonster.c om" <u6836@uwe> wrote in message
news:5bfe8a6753 6d4@uwe... I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure:
Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset
Set wsName = DBEngine.Worksp aces(0) Set dbName = wsName.OpenData base(CurrentPro ject.FullName) Set rsName = dbName.OpenReco rdset("SQL Statement")
I'm a real newbie with ADO and don't feel at all comfortable with it. Now to convert to ADO, something like:
Dim cnnName As New ADODB.Connectio n Dim rsName As New ADODB.Recordset
and here's where I start to get confused:
Set cnnName = Application.Cur rentProject.Con nection???? rsName.Open "SQL Statement" ????
Since I have several hundred of these DAO constructs, I'm trying to figure out if there is a way I could write code to accomplish the conversion.
Thanks for any help.
Microsoft says:
* ADO: ActiveX Data Objects (ADO) provides a high-level programming
model that will continue to be enhanced. Although a little less
performant than coding to OLE DB or ODBC directly, ADO is
straightforward to learn and use, and can be used from script languages
such as Microsoft Visual Basic® Scripting Edition (VBScript) or
Microsoft JScript®.
Allen:
Thank you for the information. I have another post about a prospective
client who is concerned that my application was developed on a "toy" database
because it is Access. They want me to link to a SQL SERVER backend. In my
other post I have asked forum members to help me justify Access, but let's
not continue that discussion here.
My DB is split so once we convert to SQL Server it won't be a problem. With
DAO I have linked to SQL Server on another machine in a test and the data
retrieval is faster than in linking to a Jet DB located on another machine.
So far so good.
But, I'm trying to anticipate what this prospective client might accept as
alternatives if I can't convince them that my front end is suitable.
I thought about telling them that I will convert it to VB6. But I'm not sure
how the data connections would work to SQL Server. With VB6 can I use DAO to
connect to SQL Server?
Also, what if I have them fairly convinced that my app will do the trick as
it currently is developed, only to have someone ask me if my data access is
via DAO or ADO. I think if I say DAO, it'll be counterproducti ve at that
point.
Hence, my question.
BTW: Since I've started decompiling my app, the stability has improved
markedly, although when I do have corruption it is now different involving
some weird error message that I can never resolve.
Thanks.
Allen Browne wrote: Robert, can I ask the reason for converting to ADO?
DAO is the native Access library. The A in DAO *is* Access, and it is the library Access itself uses in the interface, so why would you want to change?
Microsoft was pushing ADO about 5 years ago, as a more generic library (suitable for things wider than Access), but it is now dead, replaced by the very different ADO.NET. There is therefore now no point in doing this just to learn ADO, no point at all in doing it for an Access application, and no point at all at all in doing it for an existing Access application.
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: [quoted text clipped - 23 lines] Thanks for any help.
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200602/1
I am the world's greatest fan of ADO. Prior to my becoming so I wrote
tons of DAO stuff. I can't think of any reasons other than money or a
gun to my head that would be sufficient for me to convert any of it.
(Well, maybe sex ..., or marinated artichoke hearts). What's yours?
If you want to see how to "do" ADO look in the help file, the object
browser or, top find things quickly ... download the Miscrosoft Data
Access SDK ... which has bunches of great stuff.
"Lyle Fairfield" <ly***********@ aim.com> wrote
Do you think it serves any purpose to clutter the newsgroup with old quotes
that _appear to_ but, in fact, no longer _do_ contradict Allen Browne's
perfectly accurate comments about the "classic ADO" of which you are the
"world's greatest fan" versus ADO.NET and using DAO when the database engine
is Jet?
And, then, to post comments about the extremes to which someone would have
to go to persuade you to convert existing DAO to ADO, which apparently
contradict your contradiction?
I had really thought you were "here to help," Lyle, but perhaps I was
mistaken. Microsoft says:
To be completely honest, Lyle, you should write "Microsoft said" (past
tense).
* ADO: ActiveX Data Objects (ADO) provides a high-level programming model that will continue to be enhanced. Although a little less performant than coding to OLE DB or ODBC directly, ADO is straightforward to learn and use, and can be used from script languages such as Microsoft Visual Basic® Scripting Edition (VBScript) or Microsoft JScript®.
Have not the "knowledgea ble 'Softie insiders" blogged that the Access
development team has taken over what used to be called Jet and what used to
be called DAO, for additional development in the next version (apparently
now officially named Office 2007)?
Perhaps they are also enhancing "classic ADO" for Office 2007. Can you
provide a reference to a statement that they are?
Larry Linson
Microsoft Access MVP
"robert d via AccessMonster.c om" <u6836@uwe> wrote But, I'm trying to anticipate what this prospective client might accept as alternatives if I can't convince them that my front end is suitable.
Perhaps it would be best to concentrate on convincing them that your front
end _IS_ suitable?
I thought about telling them that I will convert it to VB6. But I'm not sure how the data connections would work to SQL Server. With VB6 can I use DAO to connect to SQL Server?
If I didn't know you were grasping at straws just to try to win the
contract, I would ask "What do you expect to gain from converting to VB6?"
There'd be a good deal to be lost, and, likely, nothing to be gained from
such a conversion. It would certainly be the question I'd ask if a client
told me they wanted to convert an Access front end to VB6.
You can see a presentation that I did for my user group on the subject ot
Access versus classic VB as a front-end for database applications at http://www.appdevissues.com/downloads.htm. It may provide some answers you
can use.
VB6 is now, AFAIK, "out of support". It was superceded by the first version
of VB.NET, and recently the third version of VB.NET was released (as part of
Visual Studio 2005).
Yes, you could use DAO with VB6 (I am reasonably certain that the DAO 3.6
library is there), but be aware that the VB community "drank the ADO
Kool-Aid" to a much greater extent than the Access community did, so you may
have to rely on VB5 examples.
Also, what if I have them fairly convinced that my app will do the trick as it currently is developed, only to have someone ask me if my data access is via DAO or ADO. I think if I say DAO, it'll be counterproducti ve at that point.
Allen has already given you the points to cover showing why DAO is the
appropriate choice. You could add that "knowledgea ble Microsoft insiders"
including the Product Manager for ADP and ADO for a previous version of
Access now recommend MDB-DAO-Jet-ODBC-server database as being generally
preferrable to ADP-ADODB-server database.
Larry Linson
Microsoft Access MVP
Thank you, Larry.
This information along with my other posts will provide me with a solid basis
for strongly supporting Access as a development environment for a front-end,
which, oh by the way, has a native database known as Jet, but which will not
be used in this implementation (SQL Server) so there are no concerns about
scalability, etc.
Larry Linson wrote: But, I'm trying to anticipate what this prospective client might accept as alternatives if I can't convince them that my front end is suitable.
Perhaps it would be best to concentrate on convincing them that your front end _IS_ suitable?
I thought about telling them that I will convert it to VB6. But I'm not sure how the data connections would work to SQL Server. With VB6 can I use DAO to connect to SQL Server?
If I didn't know you were grasping at straws just to try to win the contract, I would ask "What do you expect to gain from converting to VB6?" There'd be a good deal to be lost, and, likely, nothing to be gained from such a conversion. It would certainly be the question I'd ask if a client told me they wanted to convert an Access front end to VB6.
You can see a presentation that I did for my user group on the subject ot Access versus classic VB as a front-end for database applications at http://www.appdevissues.com/downloads.htm. It may provide some answers you can use.
VB6 is now, AFAIK, "out of support". It was superceded by the first version of VB.NET, and recently the third version of VB.NET was released (as part of Visual Studio 2005).
Yes, you could use DAO with VB6 (I am reasonably certain that the DAO 3.6 library is there), but be aware that the VB community "drank the ADO Kool-Aid" to a much greater extent than the Access community did, so you may have to rely on VB5 examples.
Also, what if I have them fairly convinced that my app will do the trick as it currently is developed, only to have someone ask me if my data access is via DAO or ADO. I think if I say DAO, it'll be counterproducti ve at that point.
Allen has already given you the points to cover showing why DAO is the appropriate choice. You could add that "knowledgea ble Microsoft insiders" including the Product Manager for ADP and ADO for a previous version of Access now recommend MDB-DAO-Jet-ODBC-server database as being generally preferrable to ADP-ADODB-server database.
Larry Linson Microsoft Access MVP
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200602/1
Larry Linson wrote: "Lyle Fairfield" <ly***********@ aim.com> wrote
Do you think it serves any purpose to clutter the newsgroup with old quotes that _appear to_ but, in fact, no longer _do_ contradict Allen Browne's perfectly accurate comments about the "classic ADO" of which you are the "world's greatest fan" versus ADO.NET and using DAO when the database engine is Jet?
And, then, to post comments about the extremes to which someone would have to go to persuade you to convert existing DAO to ADO, which apparently contradict your contradiction?
I had really thought you were "here to help," Lyle, but perhaps I was mistaken.
> Microsoft says:
To be completely honest, Lyle, you should write "Microsoft said" (past tense).
> * ADO: ActiveX Data Objects (ADO) provides > a high-level programming model that will continue > to be enhanced. Although a little less performant > than coding to OLE DB or ODBC directly, ADO > is straightforward to learn and use, and can be used > from script languages such as Microsoft Visual Basic® > Scripting Edition (VBScript) or Microsoft JScript®.
Have not the "knowledgea ble 'Softie insiders" blogged that the Access development team has taken over what used to be called Jet and what used to be called DAO, for additional development in the next version (apparently now officially named Office 2007)?
Perhaps they are also enhancing "classic ADO" for Office 2007. Can you provide a reference to a statement that they are?
Larry Linson Microsoft Access MVP
He doesn't know which contradictions are being contradicted by his
contradicting :-). Actually, what Lyle wrote made perfect sense. I'm
a big fan of DAO because I haven't needed the features specific to ADO,
but I wouldn't convert an existing ADO application to DAO without a
very good reason. He does seem to be trying to help. Maybe ADO and
DAO will be rolled up into a single technology. MS doesn't really seem
to be mentioning either one much more than the other. I'm not done
viewing, but from what I've seen, the PDC 05 presenters seemed to
mention ADO a lot more often than they did DAO; but the Access rumors
seem to favor DAO. Maybe it's like speculating that GM and Ford will
merge when one of them goes bankrupt. It's possible, but it's anyone's
guess how probable. Although, it's fun to think about a Ford Camaro or
a GM Mustang :-). I think that neither ADODB nor DAO are going away
anytime soon. If that's the case, it will be back to "Microsoft
says:." I don't disagree with what Allen wrote, but I don't see MS
giving up on ADO functionality that easily. I suspect they're going to
try -- shudder -- to fix it and include it in spite of what we've been
led to believe. But I'm not privy to any inside information so I'm
just having fun speculating.
James A. Fortune CD********@Fort uneJames.com
that was Zen, this is DAO -- Tim Mills-Groninger
On 16 Feb 2006 20:01:43 -0800, Lyle Fairfield wrote: or marinated artichoke hearts
What is artichoke?
--
K This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rex_chaos |
last post by:
Hi all,
I have a question about datatype converting. Consider the following
types
std::complex<double>
and
struct MyComplex
{
double re, im;
}
|
by: jipster |
last post by:
hi, i need help converting this java program to C++...are there any
programs or nething that could be used to do this faster??
class hw2 {
static public void main (String args) {
hw2.test();}
Board board = new Board(8);
if ( board.fillInRemainingLevels() )
board.print();
else
System.out.println("Couldn't find solution");
|
by: Colin J. Williams |
last post by:
Python advertises some basic service:
C:\Python24>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
With numarray, help gives unhelpful responses:
|
by: alyssa |
last post by:
Hi guys,
May i know how to declare a string of binary data and pass it to the method?
For example, int a={10010001120420052314}
is it correct?
and if i have receive the binary data, may i know how to separate them and
store each of them inside a variable such as int cust_id?is it possible? For
example, the first four bits is the customer id, the second four bits is the
call id and third 8 bits is the date and the remaining is the time..
...
|
by: Clark Stevens |
last post by:
I have a program that I'm converting from VB6 to VB.NET. It reads in a text
file containing barcode numbers and their corresponding descriptions. Then
the user enters the barcode number and the program finds the matching
barcode description.
In VB6 I used an UDT to store the barcode number along with the description.
Then I declared an array of the barcode UDT.
I'm thinking of converting the UDT to a structure in VB.NET and doing...
| |
by: Paraic Gallagher |
last post by:
Hi,
This is my first post to the list, I hope somebody can help me with this
problem. Apologies if it has been posted before but I have been internet
searching to no avail.
What I am trying to do is provide a simple method for a user to change a
config file, for a test suite.
The config file consists of a number of keys, eg. build number, target
device, etc.
|
by: manmit.walia |
last post by:
Hello All,
I have tried multiple online tools to convert an VB6 (bas) file to
VB.NET file and no luck. I was hoping that someone could help me covert
this. I am new to the .NET world and still learning all help would be
greatly apperciated.
Attribute VB_Name = "Module1"
Option Explicit
|
by: anukagni |
last post by:
Hi,
iam having an database for that i have created an user manual includes help topics ..I prepared in the word format and i want to covert this to html help .
Iam having Ms Html workshop but i found to hard to create any body sugess me to create an html help by converting the word matters too....
needed solution ... thanks in advance..
thanks,
anukagni
|
by: minterman |
last post by:
1. the program needs to convert btu to jules
2. Convert calories to joules
3. Convert joules to joules
4 exit the program.
if the user type anything other than 1-4 the program should print a error message.
here is my code.
import java.util.Scanner;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |