473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

get Msysobject in Access 2003

7
Dear Experts,

if we want to see msysobject in Access 2003, we can use "option" "tool" and check the System Object.

the question is ... i want update the "Option" "tool" with visual basic code in application...?
cos .. if i'm not check this option, then message error " Records cannot be read; no read permission on Msysobject" is rise

well... i m really appreciate for your help

thx 4 ur attention


-junis-
Nov 23 '06 #1
8 7142
MMcCarthy
14,534 Expert Mod 8TB
This will set the View System Objects to true.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Application.SetOption "Show System Objects", True
  3.  
Mary


Dear Experts,

if we want to see msysobject in Access 2003, we can use "option" "tool" and check the System Object.

the question is ... i want update the "Option" "tool" with visual basic code in application...?
cos .. if i'm not check this option, then message error " Records cannot be read; no read permission on Msysobject" is rise

well... i m really appreciate for your help

thx 4 ur attention


-junis-
Nov 23 '06 #2
junis
7
thank Mary,

btw .. i confused to use your code in my code
there's my code

Expand|Select|Wrap|Line Numbers
  1.    Private Sub UpdateCboTable(ByVal sFileMDB As String)
  2.  
  3.         Me.CboTable.Items.Clear()
  4.  
  5.         strConn ="Provider=Microsoft.jet.oledb.4.0; data source= " & sFileMDB 
  6.         cn = New OleDb.OleDbConnection(strConn)
  7.         cn.Open()
  8.  
  9.         lSQL = "SELECT Name FROM  MSysObjects " & _
  10.                 " WHERE  (Left([Name],4) <> 'MSys')" & _
  11.                 " AND ([Type] In (1, 4, 6)) ORDER BY Name"
  12.  
  13.         cmd = cn.CreateCommand
  14.         cmd.CommandText = lSQL
  15.         Reader = cmd.ExecuteReader()
  16.  
  17.         Do While Reader.Read()
  18.             Me.CboTable.Items.Add(Reader.GetString(0))
  19.         Loop
  20.         Reader.Close()
  21.         cn = Nothing
  22.  
  23.     End Sub
  24.  
any idea with this code ...or maybe i have mistake ...

regards

-junis-

This will set the View System Objects to true.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Application.SetOption "Show System Objects", True
  3.  
Mary
Nov 23 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. Private Sub UpdateCboTable(ByVal sFileMDB As String)
  2.  
  3. Me.CboTable.Items.Clear()
  4.  
  5. strConn ="Provider=Microsoft.jet.oledb.4.0; data source= " & sFileMDB 
  6. cn = New OleDb.OleDbConnection(strConn)
  7. cn.Open()
  8.  
  9. Application.SetOption "Show System Objects", True
  10.  
  11. lSQL = "SELECT Name FROM MSysObjects " & _
  12. " WHERE (Left([Name],4) <> 'MSys')" & _
  13. " AND ([Type] In (1, 4, 6)) ORDER BY Name"
  14.  
  15. cmd = cn.CreateCommand
  16. cmd.CommandText = lSQL
  17. Reader = cmd.ExecuteReader()
  18.  
  19. Do While Reader.Read()
  20. Me.CboTable.Items.Add(Reader.GetString(0))
  21. Loop
  22.  
  23. Application.SetOption "Show System Objects", False
  24.  
  25. Reader.Close()
  26. cn = Nothing
  27.  
  28. End Sub
  29.  
Try this ...
Nov 23 '06 #4
junis
7
i try that code ...
but i get error message

'SetOption' is not a member of 'System.Windows.Forms.Application'.
what i must do ...?
that i missed some Reference ?
Nov 23 '06 #5
MMcCarthy
14,534 Expert Mod 8TB
i try that code ...
but i get error message



what i must do ...?
that i missed some Reference ?
Are you running the code from Access or Visual Basic?
Nov 23 '06 #6
NeoPa
32,556 Expert Mod 16PB
Junis,

I'm sorry to say this, but although all this is true & correct, I don't believe it will help you as you will still have problems with permissions on that object when it's all done :(.
Nov 23 '06 #7
Killer42
8,435 Expert 8TB
I'm sorry to say this, but although all this is true & correct, I don't believe it will help you as you will still have problems with permissions on that object when it's all done :(.
Here's a post I found on another forum (which I won't name, to avoid the wrath of the moderators :)) - it may be some help. A lot depends on what environment you are working in, I expect. Are we talking about VBA? VB5? VB6? VB.Net?

If you have permissions to manipulate MS Access database then open it under the the user name which you are using to access the database from VB. (If you don't have database secured then, you don't have to worry, just open MS Access database. Then do the following:

From the Pull Down menu select
1. Tools/Options
2. Select "View" tab and make System Objects checkbox selected
3. OK
4. Go Back to Pull Down Menu and Select˙
Tools/Security/User and Groups permissions
5. On Permissions TAB choose Table object type from the Combobox
6. Select MSysObjects table and give it permissions to read data and read design

Save all this and you VB connection will get the permissions to do what you want to do.

It works under DAO but I believe it will work under ADO to. I didn't have time to check ADO, sorry, too busy
Nov 23 '06 #8
junis
7
actually i running this code in VB.net

and i get some example with DAO (VB 6)... and its work (without changing permission)


btw ... thanks a lot (mary, neopa & Killer42)
maybe i can find this matter in another forum ...

regards
-junis-
Nov 24 '06 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
2
by: BT Openworld | last post by:
I have just had to upgrade to Access 2003 as Access 97 EMail (SendObject) doesn't work when loaded on Windows XP. I'm finding my way around Access 2003 but my biggest problem is getting...
1
by: Wayne Aprato | last post by:
I have a client who is running several Access 97 databases that I have written for them. They are about to upgrade to Access 2003. Is the default file format of Access 2003 still Access 2000 the...
3
by: Colin Chudyk | last post by:
Hi, Here is my situation. Can anyone provide insight? I have developed a database in Access 2002. I am planning to distribute it as a split MDE (front) / MDB (back) to be used by the Access...
7
by: Wayne Aprato | last post by:
I have several Access 2003 mde databases. When I try to open them in Access 2002 I get the following error: "The Visual Basic for Applications project in the database is corrupt." ...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
10
by: Lauren Wilson | last post by:
Ok I have searched the MS website for info on this. I am totally confused. If I want to deploy an Access 2003 app and allow my users to run it using Access 2003 Runtime, where do I get the...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.