473,785 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my DAO-made tables are invisible, not just hidden

I'm trying to create a standard "hidden" table. However, using this
code, my tables are not displayed in the database window *even* when I
choose to show Hidden and System objects from the Options dialog:
tdf = theDB.CreateTab leDef(OptionsTa bleName)
fld = tdf.CreateField ("OptionName ",
dao.DataTypeEnu m.dbText, 50)
tdf.Fields.Appe nd(fld)

fld = tdf.CreateField ("OptionValu e",
dao.DataTypeEnu m.dbText, 250)
tdf.Fields.Appe nd(fld)

tdf.Attributes = tdf.Attributes Or
dao.TableDefAtt ributeEnum.dbHi ddenObject

theDB.TableDefs .Append(tdf)
theDB.TableDefs .Refresh()
It's actually sort of a nice feature, since you can still use the
tables (by referencing them in the SQL view of a query, for example, or
in RecordSource properties).

Using Access 2003 and making the DAO call from VB.NET using Interop, if
that matters.

Thanks,

g.

Jan 26 '06 #1
1 4543
1) I don't think the attributes are independent, and I don't
think that using 'OR' is correct here???

2) Tables created with this attribute are not visible in Access.

dbHiddenObject used to refer to the DAO attribute for temporary
objects or deleted objects. Deleted objects become not
visible in Access when you delete them, and they are
physically deleted when you compacted the database. Hidden
queries are used for the RecordSource SQL of forms. This
attribute is no longer exposed.

VB programmers never understood that dbHiddenObject was the
attribute for temporary and deleted objects. Rather than change
the attribute name, MS changed it's function in Jet 4.0, to
make it the attribute VB programmers had always thought an
attribute with that name should be. This is a new attribute
with a new function but re-using an old name.

3) Access (now) exposes it's hidden attribute, but you have
to use Access to set or read it:

application.Set HiddenAttribute acTable, "name", True

(david)

"Graham Charles" <gr****@aiid.co m> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
I'm trying to create a standard "hidden" table. However, using this
code, my tables are not displayed in the database window *even* when I
choose to show Hidden and System objects from the Options dialog:
tdf = theDB.CreateTab leDef(OptionsTa bleName)
fld = tdf.CreateField ("OptionName ",
dao.DataTypeEnu m.dbText, 50)
tdf.Fields.Appe nd(fld)

fld = tdf.CreateField ("OptionValu e",
dao.DataTypeEnu m.dbText, 250)
tdf.Fields.Appe nd(fld)

tdf.Attributes = tdf.Attributes Or
dao.TableDefAtt ributeEnum.dbHi ddenObject

theDB.TableDefs .Append(tdf)
theDB.TableDefs .Refresh()
It's actually sort of a nice feature, since you can still use the
tables (by referencing them in the SQL view of a query, for example, or
in RecordSource properties).

Using Access 2003 and making the DAO call from VB.NET using Interop, if
that matters.

Thanks,

g.

Jan 26 '06 #2

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

Similar topics

11
8532
by: Siegfried Heintze | last post by:
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?...
4
3733
by: Sharon Stern | last post by:
I have a form with a subform on it. When the user enters information into the form, I create a sql query in vba and use it to open a recordset. Then I set the subform's recordset to it. Using DAO, everything works fine. When I rewrite the code to use ADO, I get no records in my recordset. 'the dao code (returns records): Dim d_db as DAO.database
3
2621
by: JMCN | last post by:
hello i am in the midst of converting all of the "inherited" databases from access 97 to access 2000. one of the issues i have is the basic one: dao.recordset. i have read that i need to simply turn off the ADO reference and change the reference ms dao 3.6 object library to ms dao 3.51 object library or "disambiguate the code". i tried both and i still receive the error message "run time error 3420 - object invalid or no longer set."
2
1934
by: Richard Hollenbeck | last post by:
I'm sure I saw this somewhere, but I'm not finding it now. I'm using Access XP. Some time ago I decided to go with DAO instead of ADO. Earlier today I found a very cool article at The Access Web at http://www.mvps.org/access/forms/frm0047.htm about having the background color change for the current record. I don't know ADO but I know **some** DAO. I suspect the code on that page is ADO, though it looks a little like DAO. I...
18
2058
by: Sean Kirkpatrick | last post by:
I have a very ugly problem and I need some sincere guidance. My legacy VB6 application depends heavily on DAO, especially as it relates to custom properties on database objects. These custom properties are, as I understand it, not avabilable with SQL Server, which we need to migrate to in the not too distant future. My boss, the owner of the company, requires that we provide for a transition plan that minimizes (he really wants none)...
7
8370
by: marmottedodue | last post by:
Hello, I'm trying to debug an access project in which two kind of recordset are used: ADODB.recordset and DAO.recordset. I'm trying to set the whole project on DAO.recordset, but the following function does not work: Public Function GetRecordset(pstrCmdTxt As String, Optional pintCursorType As CursorTypeEnum = adOpenStatic) As Recordset ' was ADODB.recordset
2
6407
by: Dick Monahan | last post by:
I have a little VB6 program that dumps the schema of an Access 97 database. The following lines of code are relevant. Private m_wsDb As DAO.Workspace Private m_db As DAO.Database Set m_wsDb = DBEngine.CreateWorkspace("MainWS", "admin", vbNullString) Set m_db = m_wsDb.OpenDatabase(m_zDbFilePath, False, False, "") Dim tdf As TableDef
2
8194
by: Marcus | last post by:
(Appologies if this group isn't the best place for this post) Is it possible to use DAO 3.6 to access binary data (varbinary(max)) in Sql Server 2005? I have images and sound in a Sql 2005 DB that I need to retrieve (and write) with DAO (ADO and ADO.Net are not options as this is legacy code that can't be changed). Thx, Marcus
18
8520
by: Alan Welsford | last post by:
ADO Code 66 Seconds Set dcndb = New ADODB.Connection dcndb.Provider = "Microsoft.Jet.OLEDB.4.0" dcndb.ConnectionString = "Data Source=" + dtbs$ dcndb.Open Set rsUsers = New ADODB.Recordset rsUsers.Open Sql$, dcndb, adOpenForwardOnly, adLockReadOnly DAO Code 20 Seconds
6
3737
by: Iain King | last post by:
Hi. I'm using the win32 module to access an Access database, but I'm running into the File Sharing lock count as in http://support.microsoft.com/kb/815281 The solution I'd like to use is the one where you can temporarily override the setting using (if we were in VB): DAO.DBEngine.SetOption dbmaxlocksperfile,15000 Can I do this in win32com? I've been using ADO, not DAO, but I have to confess to not knowing exactly what the difference...
0
10350
Oralloy
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...
0
10157
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
10097
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
8983
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...
0
5386
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...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
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.