473,729 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How Can I List Tables in a DB?

I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want
to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want
to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.o rg
Jul 19 '05 #1
11 4415
Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
..NET MVP

"Wayne Wengert" <wa***@wengert. org> wrote in message news:eM******** ******@TK2MSFTN GP09.phx.gbl...
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want
to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want
to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.o rg



Jul 19 '05 #2
Thanks for that pointer. I'll use that sample and see if I can adapt it to
my Windows Form app. I did not know about the "AllTables" parameter - that
is what I think I need.

Wayne

"Sonali.NET[MVP]" <xb********@hot mail.com> wrote in message
news:eK******** *****@TK2MSFTNG P10.phx.gbl...
Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
..NET MVP

"Wayne Wengert" <wa***@wengert. org> wrote in message
news:eM******** ******@TK2MSFTN GP09.phx.gbl...
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.o rg

Jul 19 '05 #3
Good idea. I'll play with that

Wayne

"Rick" <ri**@NOSPAM.co mputetosuit.com > wrote in message
news:Oe******** ******@tk2msftn gp13.phx.gbl...
You might want to look at the MSysObjects table. It is an access table that lists all the objects for the database. I am pretty sure that the Type
column is 1 for table, and all the system tables are named "MSys*", so you
should be able to see all the tables that way.
"Wayne Wengert" <wa***@wengert. org> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Sonali;

It turns out that the syntax in that example does not work against an Access
DB. I am trying to find the right way to do this in Access without having to
go back to ADOX.

Wayne

"Sonali.NET[MVP]" <xb********@hot mail.com> wrote in message
news:eK******** *****@TK2MSFTNG P10.phx.gbl...
Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
.NET MVP

"Wayne Wengert" <wa***@wengert. org> wrote in message
news:eM******** ******@TK2MSFTN GP09.phx.gbl...
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I

want
to display a list of all tables in an Access database. I want to put

that list of table names in a listbox so the user can select the table they

want
to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.o rg



Jul 19 '05 #4
On Wed, 13 Aug 2003 12:06:14 -0600, "Wayne Wengert" <wa***@wengert. org> wrote:

¤ I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want
¤ to display a list of all tables in an Access database. I want to put that
¤ list of table names in a listbox so the user can select the table they want
¤ to use. How can I do this?

Give the following a try:

Sub ListAccessTable s()

Dim AccessConnectio n As System.Data.Ole Db.OleDbConnect ion
Dim AccessDataTable As DataTable

Try

AccessConnectio n = New
System.Data.Ole Db.OleDbConnect ion("Provider=M icrosoft.Jet.OL EDB.4.0;" & _
"Data Source=E:\My Documents\db1.m db")

AccessConnectio n.Open()

AccessDataTable =
AccessConnectio n.GetOleDbSchem aTable(System.D ata.OleDb.OleDb SchemaGuid.Tabl es, New Object()
{Nothing, Nothing, Nothing, "TABLE"})

DataGrid1.DataS ource = AccessDataTable

Catch ex As Exception
MessageBox.Show (ex.Message)
Finally
AccessConnectio n.Close()

End Try

End Sub
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 19 '05 #5
Hi Wayne,

To resolve this issue, we can perform the following steps:

1. Open the access database.
2. Click Tools on the menu and choose Options.
3. On the view tab, check Hidden objects and System objects. Click OK.
4. Click Tools on the menu and move to Security, choose User and Group
Permissions.
5. Select your user name and "MsysObject s" object name. Check "read data".

Then, the MsysObjects table can be accessed from code.

Does this answer your question? Please let me know if you need more
information

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Wayne Wengert" <wa***@wengert. org>
| References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| Subject: Permission Problem
| Date: Thu, 14 Aug 2003 08:10:01 -0600
| Lines: 148
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ev************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104555
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| When I try to open the MSysObjects table I get the attached error. The
| Access DB is not password protected. How do I enable access to this table?
|
| Wayne
|
| "Wayne Wengert" <wa***@wengert. org> wrote in message
| news:eM******** ******@TK2MSFTN GP09.phx.gbl...
| > I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I
| want
| > to display a list of all tables in an Access database. I want to put
that
| > list of table names in a listbox so the user can select the table they
| want
| > to use. How can I do this?
| >
| > --
| > ------------------------------------
| > Wayne Wengert
| > wa***@wengert.o rg
| >
| >
|
|
|

Jul 19 '05 #6
The table is created "on-the-fly" from my code. The user enters some data in
a particular situation and my code creates a new table. How can I set the
user permissions from code.

Also, I added "User ID = Admin" to the connection string and that does not
help. I tried experimenting with a table my program had created earlier and
Access will not let me assign Read rights to any user I create. The
MSysObjects table shows the owner as "Engine"

Wayne

"Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
news:Ku******** *****@cpmsftngx a06.phx.gbl...
Hi Wayne,

To resolve this issue, we can perform the following steps:

1. Open the access database.
2. Click Tools on the menu and choose Options.
3. On the view tab, check Hidden objects and System objects. Click OK.
4. Click Tools on the menu and move to Security, choose User and Group
Permissions.
5. Select your user name and "MsysObject s" object name. Check "read data".

Then, the MsysObjects table can be accessed from code.

Does this answer your question? Please let me know if you need more
information

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Wayne Wengert" <wa***@wengert. org>
| References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| Subject: Permission Problem
| Date: Thu, 14 Aug 2003 08:10:01 -0600
| Lines: 148
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ev************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104555
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| When I try to open the MSysObjects table I get the attached error. The
| Access DB is not password protected. How do I enable access to this table? |
| Wayne
|
| "Wayne Wengert" <wa***@wengert. org> wrote in message
| news:eM******** ******@TK2MSFTN GP09.phx.gbl...
| > I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I
| want
| > to display a list of all tables in an Access database. I want to put
that
| > list of table names in a listbox so the user can select the table they
| want
| > to use. How can I do this?
| >
| > --
| > ------------------------------------
| > Wayne Wengert
| > wa***@wengert.o rg
| >
| >
|
|
|

Jul 19 '05 #7
Hi Wayne,

You may use SQL DDL to change permissions on the tables. Please check
following articles for more information:

Advanced Microsoft Jet SQL for Access 2000
http://msdn.microsoft.com/library/en...l/acadvsql.asp

Intermediate Microsoft Jet SQL for Access 2000
http://msdn.microsoft.com/library/en...l/acintsql.asp

Hope this is helpful.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Wayne Wengert" <wa***@wengert. org>
| References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
<ev************ **@tk2msftngp13 .phx.gbl>
<Ku************ *@cpmsftngxa06. phx.gbl>
| Subject: Re: Permission Problem
| Date: Thu, 14 Aug 2003 12:38:40 -0600
| Lines: 80
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O9************ **@TK2MSFTNGP09 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104597
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| The table is created "on-the-fly" from my code. The user enters some data
in
| a particular situation and my code creates a new table. How can I set the
| user permissions from code.
|
| Also, I added "User ID = Admin" to the connection string and that does not
| help. I tried experimenting with a table my program had created earlier
and
| Access will not let me assign Read rights to any user I create. The
| MSysObjects table shows the owner as "Engine"
|
| Wayne
|
| "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:Ku******** *****@cpmsftngx a06.phx.gbl...
| > Hi Wayne,
| >
| > To resolve this issue, we can perform the following steps:
| >
| > 1. Open the access database.
| > 2. Click Tools on the menu and choose Options.
| > 3. On the view tab, check Hidden objects and System objects. Click OK.
| > 4. Click Tools on the menu and move to Security, choose User and Group
| > Permissions.
| > 5. Select your user name and "MsysObject s" object name. Check "read
data".
| >
| > Then, the MsysObjects table can be accessed from code.
| >
| > Does this answer your question? Please let me know if you need more
| > information
| >
| > Best regards,
| > Lewis
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| > --------------------
| > | From: "Wayne Wengert" <wa***@wengert. org>
| > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > | Subject: Permission Problem
| > | Date: Thu, 14 Aug 2003 08:10:01 -0600
| > | Lines: 148
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <ev************ **@tk2msftngp13 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104555
| > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > |
| > | When I try to open the MSysObjects table I get the attached error. The
| > | Access DB is not password protected. How do I enable access to this
| table?
| > |
| > | Wayne
| > |
| > | "Wayne Wengert" <wa***@wengert. org> wrote in message
| > | news:eM******** ******@TK2MSFTN GP09.phx.gbl...
| > | > I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000
database. I
| > | want
| > | > to display a list of all tables in an Access database. I want to put
| > that
| > | > list of table names in a listbox so the user can select the table
they
| > | want
| > | > to use. How can I do this?
| > | >
| > | > --
| > | > ------------------------------------
| > | > Wayne Wengert
| > | > wa***@wengert.o rg
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Jul 19 '05 #8
Hi Wayne,

You may set "impersonat e" to "true" in web.config, then the ASP.NET
application will have the permission to access the Hidden Objects in Access.

The following is a code snippet for a demonstration.
<identity impersonate="tr ue"></identity>

INFO: Implementing Impersonation in an ASP.NET Application.
<http://support.microso ft.com/?id=306158>

INFO: ASP.NET Security Overview
<http://support.microso ft.com/default.aspx?id =306590>

Does this answer your question? Please let me know if you need more
information.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Wayne Wengert" <wa***@wengert. org>
| References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
<ev************ **@tk2msftngp13 .phx.gbl>
<Ku************ *@cpmsftngxa06. phx.gbl>
<O9************ **@TK2MSFTNGP09 .phx.gbl>
<nX************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Permission Problem
| Date: Fri, 15 Aug 2003 17:20:13 -0600
| Lines: 437
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <us************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104734
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| Lewis;
|
| I tried using the samples in the referenced articles using this code:
|
| strSQL = "GRANT SELECT ON TABLE MSysObjects TO Admin"
|
| myConn.Execute( strSQL)
|
|
| But I get the attached error. I am not sure how to resolve this? I did add
| the Imports for Interop thinking that might help - it didn't.
|
| Wayne
|
| "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:nX******** ******@cpmsftng xa06.phx.gbl...
| > Hi Wayne,
| >
| > You may use SQL DDL to change permissions on the tables. Please check
| > following articles for more information:
| >
| > Advanced Microsoft Jet SQL for Access 2000
| > http://msdn.microsoft.com/library/en...l/acadvsql.asp
| >
| > Intermediate Microsoft Jet SQL for Access 2000
| > http://msdn.microsoft.com/library/en...l/acintsql.asp
| >
| > Hope this is helpful.
| >
| > Best regards,
| > Lewis
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Wayne Wengert" <wa***@wengert. org>
| > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > <ev************ **@tk2msftngp13 .phx.gbl>
| > <Ku************ *@cpmsftngxa06. phx.gbl>
| > | Subject: Re: Permission Problem
| > | Date: Thu, 14 Aug 2003 12:38:40 -0600
| > | Lines: 80
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <O9************ **@TK2MSFTNGP09 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104597
| > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > |
| > | The table is created "on-the-fly" from my code. The user enters some
| data
| > in
| > | a particular situation and my code creates a new table. How can I set
| the
| > | user permissions from code.
| > |
| > | Also, I added "User ID = Admin" to the connection string and that does
| not
| > | help. I tried experimenting with a table my program had created
earlier
| > and
| > | Access will not let me assign Read rights to any user I create. The
| > | MSysObjects table shows the owner as "Engine"
| > |
| > | Wayne
| > |
| > | "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:Ku******** *****@cpmsftngx a06.phx.gbl...
| > | > Hi Wayne,
| > | >
| > | > To resolve this issue, we can perform the following steps:
| > | >
| > | > 1. Open the access database.
| > | > 2. Click Tools on the menu and choose Options.
| > | > 3. On the view tab, check Hidden objects and System objects. Click
OK.
| > | > 4. Click Tools on the menu and move to Security, choose User and
Group
| > | > Permissions.
| > | > 5. Select your user name and "MsysObject s" object name. Check "read
| > data".
| > | >
| > | > Then, the MsysObjects table can be accessed from code.
| > | >
| > | > Does this answer your question? Please let me know if you need more
| > | > information
| > | >
| > | > Best regards,
| > | > Lewis
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | >
| > | > --------------------
| > | > | From: "Wayne Wengert" <wa***@wengert. org>
| > | > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > | > | Subject: Permission Problem
| > | > | Date: Thu, 14 Aug 2003 08:10:01 -0600
| > | > | Lines: 148
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <ev************ **@tk2msftngp13 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104555
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > | > |
| > | > | When I try to open the MSysObjects table I get the attached error.
| The
| > | > | Access DB is not password protected. How do I enable access to
this
| > | table?
| > | > |
| > | > | Wayne
| > | > |
| > | > | "Wayne Wengert" <wa***@wengert. org> wrote in message
| > | > | news:eM******** ******@TK2MSFTN GP09.phx.gbl...
| > | > | > I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000
| > database. I
| > | > | want
| > | > | > to display a list of all tables in an Access database. I want to
| put
| > | > that
| > | > | > list of table names in a listbox so the user can select the
table
| > they
| > | > | want
| > | > | > to use. How can I do this?
| > | > | >
| > | > | > --
| > | > | > ------------------------------------
| > | > | > Wayne Wengert
| > | > | > wa***@wengert.o rg
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Jul 19 '05 #9
Hi Wayne,

Sorry for my misunderstandin g.

I am checking this issue, and will get back to you with my findings.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Wayne Wengert" <wa***@wengert. org>
| References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
<ev************ **@tk2msftngp13 .phx.gbl>
<Ku************ *@cpmsftngxa06. phx.gbl>
<O9************ **@TK2MSFTNGP09 .phx.gbl>
<nX************ **@cpmsftngxa06 .phx.gbl>
<us************ **@TK2MSFTNGP10 .phx.gbl>
<HJ************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Permission Problem
| Date: Mon, 18 Aug 2003 03:56:53 -0600
| Lines: 217
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OR************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104867
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| This is a Windows application - will that technique still work?
|
| Wayne
|
| "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:HJ******** ******@cpmsftng xa06.phx.gbl...
| > Hi Wayne,
| >
| > You may set "impersonat e" to "true" in web.config, then the ASP.NET
| > application will have the permission to access the Hidden Objects in
| Access.
| >
| > The following is a code snippet for a demonstration.
| > <identity impersonate="tr ue"></identity>
| >
| > INFO: Implementing Impersonation in an ASP.NET Application.
| > <http://support.microso ft.com/?id=306158>
| >
| > INFO: ASP.NET Security Overview
| > <http://support.microso ft.com/default.aspx?id =306590>
| >
| > Does this answer your question? Please let me know if you need more
| > information.
| >
| > Best regards,
| > Lewis
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| > --------------------
| > | From: "Wayne Wengert" <wa***@wengert. org>
| > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > <ev************ **@tk2msftngp13 .phx.gbl>
| > <Ku************ *@cpmsftngxa06. phx.gbl>
| > <O9************ **@TK2MSFTNGP09 .phx.gbl>
| > <nX************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Permission Problem
| > | Date: Fri, 15 Aug 2003 17:20:13 -0600
| > | Lines: 437
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <us************ **@TK2MSFTNGP10 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104734
| > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > |
| > | Lewis;
| > |
| > | I tried using the samples in the referenced articles using this code:
| > |
| > | strSQL = "GRANT SELECT ON TABLE MSysObjects TO Admin"
| > |
| > | myConn.Execute( strSQL)
| > |
| > |
| > | But I get the attached error. I am not sure how to resolve this? I did
| add
| > | the Imports for Interop thinking that might help - it didn't.
| > |
| > | Wayne
| > |
| > | "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| > | news:nX******** ******@cpmsftng xa06.phx.gbl...
| > | > Hi Wayne,
| > | >
| > | > You may use SQL DDL to change permissions on the tables. Please
check
| > | > following articles for more information:
| > | >
| > | > Advanced Microsoft Jet SQL for Access 2000
| > | > http://msdn.microsoft.com/library/en...l/acadvsql.asp
| > | >
| > | > Intermediate Microsoft Jet SQL for Access 2000
| > | > http://msdn.microsoft.com/library/en...l/acintsql.asp
| > | >
| > | > Hope this is helpful.
| > | >
| > | > Best regards,
| > | > Lewis
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | > --------------------
| > | > | From: "Wayne Wengert" <wa***@wengert. org>
| > | > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > | > <ev************ **@tk2msftngp13 .phx.gbl>
| > | > <Ku************ *@cpmsftngxa06. phx.gbl>
| > | > | Subject: Re: Permission Problem
| > | > | Date: Thu, 14 Aug 2003 12:38:40 -0600
| > | > | Lines: 80
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <O9************ **@TK2MSFTNGP09 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | > | Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:104597
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > | > |
| > | > | The table is created "on-the-fly" from my code. The user enters
some
| > | data
| > | > in
| > | > | a particular situation and my code creates a new table. How can I
| set
| > | the
| > | > | user permissions from code.
| > | > |
| > | > | Also, I added "User ID = Admin" to the connection string and that
| does
| > | not
| > | > | help. I tried experimenting with a table my program had created
| > earlier
| > | > and
| > | > | Access will not let me assign Read rights to any user I create.
The
| > | > | MSysObjects table shows the owner as "Engine"
| > | > |
| > | > | Wayne
| > | > |
| > | > | "Lewis Wang [MSFT]" <v-*****@online.mi crosoft.com> wrote in
message
| > | > | news:Ku******** *****@cpmsftngx a06.phx.gbl...
| > | > | > Hi Wayne,
| > | > | >
| > | > | > To resolve this issue, we can perform the following steps:
| > | > | >
| > | > | > 1. Open the access database.
| > | > | > 2. Click Tools on the menu and choose Options.
| > | > | > 3. On the view tab, check Hidden objects and System objects.
Click
| > OK.
| > | > | > 4. Click Tools on the menu and move to Security, choose User and
| > Group
| > | > | > Permissions.
| > | > | > 5. Select your user name and "MsysObject s" object name. Check
| "read
| > | > data".
| > | > | >
| > | > | > Then, the MsysObjects table can be accessed from code.
| > | > | >
| > | > | > Does this answer your question? Please let me know if you need
| more
| > | > | > information
| > | > | >
| > | > | > Best regards,
| > | > | > Lewis
| > | > | >
| > | > | > This posting is provided "AS IS" with no warranties, and confers
| no
| > | > | rights.
| > | > | >
| > | > | > --------------------
| > | > | > | From: "Wayne Wengert" <wa***@wengert. org>
| > | > | > | References: <eM************ **@TK2MSFTNGP09 .phx.gbl>
| > | > | > | Subject: Permission Problem
| > | > | > | Date: Thu, 14 Aug 2003 08:10:01 -0600
| > | > | > | Lines: 148
| > | > | > | X-Priority: 3
| > | > | > | X-MSMail-Priority: Normal
| > | > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | > | Message-ID: <ev************ **@tk2msftngp13 .phx.gbl>
| > | > | > | Newsgroups: microsoft.publi c.dotnet.genera l
| > | > | > | NNTP-Posting-Host: skybeam143.skyb eam.frii.net 216.17.229.143
| > | > | > | Path:
| > cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| > | > | > | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.genera l:104555
| > | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| > | > | > |
| > | > | > | When I try to open the MSysObjects table I get the attached
| error.
| > | The
| > | > | > | Access DB is not password protected. How do I enable access to
| > this
| > | > | table?
| > | > | > |
| > | > | > | Wayne
| > | > | > |
| > | > | > | "Wayne Wengert" <wa***@wengert. org> wrote in message
| > | > | > | news:eM******** ******@TK2MSFTN GP09.phx.gbl...
| > | > | > | > I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000
| > | > database. I
| > | > | > | want
| > | > | > | > to display a list of all tables in an Access database. I
want
| to
| > | put
| > | > | > that
| > | > | > | > list of table names in a listbox so the user can select the
| > table
| > | > they
| > | > | > | want
| > | > | > | > to use. How can I do this?
| > | > | > | >
| > | > | > | > --
| > | > | > | > ------------------------------------
| > | > | > | > Wayne Wengert
| > | > | > | > wa***@wengert.o rg
| > | > | > | >
| > | > | > | >
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Jul 19 '05 #10

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

Similar topics

1
9896
by: Not Me | last post by:
Hi, I'm sure this is a common problem.. to create a single field from a whole column, where each row would be separated by a comma. I can do this for a specified table, and column.. and I've created a function using VBA to achieve a more dynamic (and very slow) solution.. so I would like to implement it using a user defined function in sql server. The problems I'm facing are, that I can't use dynamic sql in a
0
1231
by: picander77 | last post by:
Hello! I need to perform the following operation on an XML document: I have a first element containing a list of team (<Teams>). A name is assigned to all teams, as well as a list of their members. In a second element, I have a list of tables, and the people sitting on those tables. The people sitting on the tables are always teams, but the team's names are not stored in the element <Table>. Notice that the names could not always be in...
8
4335
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. Basically I want to say: If fk_ID is in list then do these statements to that record
2
1985
by: Brian Henry | last post by:
I am working on a internal intranet site, and i need to make a permissions page, all the account authorization is done through AD to let them see the intranet site.. now, the permissions page i need a list of users in AD... is this possible to get a list of user names from ad? (the server is on the domain that hosts the intranet site)
5
14076
by: Javed | last post by:
Hi, is there a way to get a list of tables in MDB file? Ideally I want to write an SQL similar to 'select * from tab' of oracle.
5
14194
by: Lee Brotzman | last post by:
Hi, I have a sequence of data tables in an ordered list, like this: <ol> <li><table></table></li> <li><table></table></li> </ol> However it renders on the page with the list item number next to the
7
17443
by: =?Utf-8?B?UmVraGE=?= | last post by:
Hi, I am trying to change the font color for the items in a dropdownlist control at run time using ASP.NET 2.0. DropDownList1.Items.Attributes.Add("style", "color:red"); But when I run the application, I don't see any color change. I am using Visual Studio 2005, ASP.NEt 2.0.
3
3188
by: Robertf987 | last post by:
Well, I think I've described what I want to do in the title here. In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for application details. I have a query for each of them to copy all the contents of the table into a new table, then delete all the data from the main table. I need to do this becasue once a year the data needs to be removed, ready for putting in new data. I...
2
6232
by: Lysander | last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article. For a combo or list box, the source data is normally a Table/Query. Or it could be a value list, a static list of data. But what if your information is not held in a table, and it is not a static list. Examples I have used have been, “next 100 prime numbers after this one”, “Every third Friday from start of...
1
1570
by: raam | last post by:
hi I have a list box with some country names from database. when i click search button the "country" list selecteditem should be selected. but it is not. here is my code where iam using a stored procedure which is outputting 3 tables simultaneously. the list box of country is 3rd table that is table if (objDataSet.Tables.Rows.Count > 0) {
0
8913
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
8761
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
9280
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...
0
9142
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
8144
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
6722
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
6016
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();...
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2162
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.