473,698 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing DAO into .NET Project

Someone in the Access forum explained that I could retrieve metadata from
Access with the DAO API. I specifically what to retrieve the comments for
each column and table. I also want to retrieve the control associated with
each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C
interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried
Jul 21 '05 #1
11 8523
DAO has been a dead technology for over 5 years.
ADO replaced DAO.
While you can make a COM reference in .NET to the ADO library, .NET's native
database connection technology is ADO.NET.
"Siegfried Heintze" <si*******@hein tze.com> wrote in message
news:u6******** *****@TK2MSFTNG P10.phx.gbl...
Someone in the Access forum explained that I could retrieve metadata from
Access with the DAO API. I specifically what to retrieve the comments for
each column and table. I also want to retrieve the control associated with
each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C
interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried

Jul 21 '05 #2
Seigfried,
While it is best to use ADO.NET in preference to ADO and it is better to use
ADO than DAO, DAO is still around. We just don't know for how long because
it is an obsolescent technology - it may be dying but it's not dead yet.

For properties of tables and columns, you'd be better off looking at the
System.Data.Dat aTable and System.Data.Dat aColumn objects in VS.NET if you're
starting from scratch - that's the direction things are going. I'm not sure
if AdoDotAnything will retrieve the property for the "Display Control" of an
Access table - I haven't tried that.

However, if you need to port DAO into .NET, you should be able to do it. I
can see a COM reference to "Microsoft DAO 3.6 Object Library" as well as
references to earlier versions of DAO when I add a reference to a VB.NET
project. If you have the file "C:\Program Files\Microsoft
Shared\DAO\dao3 60.dll", for example, on your PC but it's not showing up as a
COM reference, it's just not registered properly.

Hope this helps,
David Straker

"Scott M." <s-***@badspamsnet .net> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
DAO has been a dead technology for over 5 years.
ADO replaced DAO.
While you can make a COM reference in .NET to the ADO library, .NET's native database connection technology is ADO.NET.
"Siegfried Heintze" <si*******@hein tze.com> wrote in message
news:u6******** *****@TK2MSFTNG P10.phx.gbl...
Someone in the Access forum explained that I could retrieve metadata from Access with the DAO API. I specifically what to retrieve the comments for each column and table. I also want to retrieve the control associated with each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried


Jul 21 '05 #3

For properties of tables and columns, you'd be better off
looking at the System.Data.Dat aTable and
System.Data.Da taColumn objects in VS.NET if you're
starting from scratch - that's the direction things are
going. I'm not sure if AdoDotAnything will retrieve
the property for the "Display Control" of an
Access table - I haven't tried that.


I've tried that -- did I miss something? I wrote a program that used a
treeview view to display everything I could find in the DataTable and
DataColumn and I could not find the MSAccess specific metadata like the
comments for the table and the columns and the control type used for
each column.

This does not surprise me -- why would a generic API have MSAccess
specific stuff. I also tried using ADOX and could get some but not all
of the metadata.

MSAccess is the only database (that I know of) that lets you store a
control (checkbox, dropdown list, etc...) for each column you define.

So why do you say DAO is going away? I hope not! It is the only way of
doing MSAccess specific stuff! Is there a better API for MSAccess
specific stuff? That would be nice! Or should I infer from you statement
that MSAccess is not dead yet but dying?

Thanks,
Siegfried

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
I cannot find "C:\Program Files\Microsoft
Shared\DAO\dao3 60.dll", on my computer because I don't have a
"Microsoft Shared" directory. Where else might I look for it?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5
I found it!

It is in C:\Program Files\Common Files\Microsoft Shared\DAO

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #6
Siegfried,

I disagree with David. DAO is a dead technology, it's not going away, it's
already gone. MS doesn't support it (and hasn't for quite some time) and
there have been 2 new generations of data accessing technologies since DAO.

As for your comment that it is the only way of doing MS Access specific
stuff, that's not true at all.

In .NET, you could connect to an Access DB like this:

Dim conStr As String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Server.MapPath( "db.mdb")
Dim sqlStr As String = "Select ....ORDER BY ...."

Dim con As OleDb.OleDbConn ection
Dim cmd As OleDb.OleDbComm and

con = New OleDb.OleDbConn ection(conStr)
cmd = New OleDb.OleDbComm and(sqlStr, con)

con.Open()

Now, once you have your connection object open, you can do many things, use
a DataReader (for read only - connected - forward only access), use a
dataSet, use a datatabe, a dataview, etc.

-Scott

"Siegfried Heintze" <si*******@hein tze.com> wrote in message
news:e8******** *****@TK2MSFTNG P10.phx.gbl...

For properties of tables and columns, you'd be better off
looking at the System.Data.Dat aTable and
System.Data.Da taColumn objects in VS.NET if you're
starting from scratch - that's the direction things are
going. I'm not sure if AdoDotAnything will retrieve
the property for the "Display Control" of an
Access table - I haven't tried that.


I've tried that -- did I miss something? I wrote a program that used a
treeview view to display everything I could find in the DataTable and
DataColumn and I could not find the MSAccess specific metadata like the
comments for the table and the columns and the control type used for
each column.

This does not surprise me -- why would a generic API have MSAccess
specific stuff. I also tried using ADOX and could get some but not all
of the metadata.

MSAccess is the only database (that I know of) that lets you store a
control (checkbox, dropdown list, etc...) for each column you define.

So why do you say DAO is going away? I hope not! It is the only way of
doing MSAccess specific stuff! Is there a better API for MSAccess
specific stuff? That would be nice! Or should I infer from you statement
that MSAccess is not dead yet but dying?

Thanks,
Siegfried

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #7
Seigfried,
Sorry I gave you the wrong folder for the DAO dll - late night stupidity I
think.

There are a lot of indicators that DAO is being phased out. The absence of a
..NET assembly for DAO in VS.NET is a pretty good indicator in itself of the
direction that Microsoft is going. I also agree that there are aspects of
the Access schema that are way beyond any other - like the ability to define
the default control for a column. But it looks like we're being strongly
encouraged to move away from DAO. I seem to remember coming across some info
in that line earlier this year but I can't remember where - probably the
Microsoft web site. As far as Access is concerned, I don't see it as
obsolescent technology and I've heard nothing along those lines. imho I
think its a work of genius. In fact, the Microsoft Access Product Team are
currently calling for input to make sure that mdb conversion to the next
version is as robust as possible.

I've only written schema interrogators using ADOX and ADO.NET primarily for
data validation routines prior to database updates. Things like "is the
user's data valid based on the schema definition for the column" so I
haven't delved into the extended column properties like "descriptio n" or
"default control". I'll give it a try when I have some time over the next
few days and let you know what I find.

David Straker

"Siegfried Heintze" <si*******@hein tze.com> wrote in message
news:e8******** *****@TK2MSFTNG P10.phx.gbl...

For properties of tables and columns, you'd be better off
looking at the System.Data.Dat aTable and
System.Data.Da taColumn objects in VS.NET if you're
starting from scratch - that's the direction things are
going. I'm not sure if AdoDotAnything will retrieve
the property for the "Display Control" of an
Access table - I haven't tried that.


I've tried that -- did I miss something? I wrote a program that used a
treeview view to display everything I could find in the DataTable and
DataColumn and I could not find the MSAccess specific metadata like the
comments for the table and the columns and the control type used for
each column.

This does not surprise me -- why would a generic API have MSAccess
specific stuff. I also tried using ADOX and could get some but not all
of the metadata.

MSAccess is the only database (that I know of) that lets you store a
control (checkbox, dropdown list, etc...) for each column you define.

So why do you say DAO is going away? I hope not! It is the only way of
doing MSAccess specific stuff! Is there a better API for MSAccess
specific stuff? That would be nice! Or should I infer from you statement
that MSAccess is not dead yet but dying?

Thanks,
Siegfried

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #8
On Tue, 23 Sep 2003 17:55:11 -0600, "Siegfried Heintze" <si*******@hein tze.com> wrote:

¤ Someone in the Access forum explained that I could retrieve metadata from
¤ Access with the DAO API. I specifically what to retrieve the comments for
¤ each column and table. I also want to retrieve the control associated with
¤ each column in MSAccess.
¤
¤ When I fired up VS.NET to start the project, I could not find the DAO to
¤ import! Where is it? I assume it is a COM interface. I think there is a C
¤ interface too for DAO -- what is that called? Is there a native .NET
¤ interface too?
¤

You may also want to try GetOleDbSchemaT able before reverting to DAO or ADOX:

HOW TO: Retrieve Schema Information by Using GetOleDbSchemaT able and Visual Basic .NET
http://support.microsoft.com/default...Product=adonet
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #9
Siegfried,
I can't find any way of retrieving Access-specific column properties (like
the control associated with the Access column) in ADO.NET. It may be
possible but I can't see it. I can infer one in code, from data type,
foreign keys, etc. in ADO.NET but that's pretty laborious. Sorry I couldn't
help, dude.

Will somebody from Microsoft please step in and give the facts to Scott M.
on support for DAO. He's posting the same statements about it not being
supported for 5 years in at least one other forum. I know that the big move
is towards ADO.NET but DAO is in Windows XP which is the most recent version
of Access, Access XP is supported by Microsoft therefore DAO is supported by
Microsoft. Isn't that "Logic 101"?

David Straker

"Siegfried Heintze" <si*******@hein tze.com> wrote in message
news:u6******** *****@TK2MSFTNG P10.phx.gbl...
Someone in the Access forum explained that I could retrieve metadata from
Access with the DAO API. I specifically what to retrieve the comments for
each column and table. I also want to retrieve the control associated with
each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C
interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried

Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2033
by: Awah Teh | last post by:
I am working on a project that involves importing IIS Log files into a SQL Server database (and these logfiles are big --> Some up to 2GB in size). Up until now I thought that DTS or the BULK INSERT command was the fastest method out there, but still proves to be long (taking an average of 45mns to an hour to process each log file). Because I have to import the log files from three web heads in my cluster (therefore 2GB log files per...
9
4033
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then need to input this in an Access database, where I do a comparison with the Actual cost. The table “TblBudget” in Access is made of 4 fields, namely: (1) CostElement (2) CostCenter (3) Month (4) Amount$. At the moment this method is very cumbersome....
1
3677
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
7
3302
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
5
1512
by: Howard Kaikow | last post by:
I have files to build a C project, including the makefile, what's the easiest way to import the project into C and C# in VS .NET Professional? I have both VS .NET 2002 and 2003. I have nothing but VB .NET books. I guess it's time to get a book for each of C++ and C# in .NET. Any recommendations -- http://www.standards.com/; See Howard Kaikow's web site.
1
2108
by: em | last post by:
Hi all, I'm getting some problems importing a DLL that I made in C# within VB6.0. The C# is quite easy, just for trying: namespace TestDll { public class Class1
0
489
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX file has been used for code-signing before (to sign an InfoPath form), so therefore the file contains a valid code-signing key. I have the correct password to the PFX file (because I get a different error
12
6215
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the datagrid. Once I can get to that point I need some way to be able to add new data only to the new columns that were added. Here is some of my code: //Function For Importing Data From CSV File public DataSet ConnectCSV(string filetable)
5
5753
by: Ronny | last post by:
I need to import the Winform GUI from one project to another(with all the controls). Is there a simple way to copy&paste it or must I create every control by hand Regards Ronny
7
1600
by: Hussein B | last post by:
Hey, Suppose I have a Python application consists of many modules (lets say it is a Django application). If all the modules files are importing sys module, how many times the sys module will be compiled and executed? Only once (the first time the PVM locates, compiles and executes the sys module)? or once for each module importing sys? Thanks.
0
8674
marktang
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...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9026
jinu1996
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...
1
8893
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,...
0
8861
tracyyun
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...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.