Access database "current user"

I need some help with user credentials when using the Database Connectivity toolkit to interface with an Access database file. There are users and groups defined in a workgroup. Using a file DSN I am able to read and write to tables in the Access databse file. However, I have absolutely no idea how to "extract" user names from the .mdw file. Any help is appreciated. Thanks.

Hi j_a,
The biggest hurdle that we are going to face is the .mdw file structure/format. Although there is no VI which directly reads the file, I think one of the work-arounds is to convert the file to text which then you can parse the usernames to populate your control. The encryption of the file will prevent any conversion using notepad/wordpad so we are going to need a third-party converter. 
Aldo A
Applications Engineer
National Instruments

Similar Messages

  • Accessing the current User code

    In order to find out who the current user is, we used to (in SQL 2000) use $[user].  However, this does not appear to work when the database is SQL 2005.  Does anyone know of a solution to this? (Our current objective is to create a log file showing changes to the price lists, as there is not standard audit trail in SBO – so any advice in this regard much appreciated).

    I believe you are talking about using the $[USER] from within SBO.
    The $[USER] should work regardless of the SQL Server version.  To record the Pricelist change as and when it happen would have to be done using the SBO_TransactionNotification Stored procedure provided by SBO to trigger action when on certain event.
    Suda

  • The Microsoft Access database engine cannot open or write to the file \\fileserver\db\access.mdb

    Hi,
    I have Windows Server 2012 with SQL 2012 Standard SP1. I am using linked server, and Access Database Engine 2010 Redistributable to access my database file made in Microsoft Access (.mdb) from network file server.
    EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer', @srvproduct=N'MyLinkedServer', @provider=N'Microsoft.ACE.OLEDB.12.0', @datasrc=N'\\myfileserver.mydomain.com\files\mydatabase.mdb'
    My SQL service is running with domain service account MYDOMAIN\SQL1$ , i have added Full control for file share and NTFS permission on my file server folder (C:\Files).
    When I open (as domain admin with UAC elevated permissions) on my DB server SQL Management studio, I can browse tables and everything works.
    The problem is, if I open SQL management studio (as domain admin with UAC elevated permissions) on my File server or any other computer, when trying to browse my linked server i got error:
    TITLE: Microsoft SQL Server Management Studio
    Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Synesis_3PRO2013". (Microsoft SQL Server, Error: 7303)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.00.3000&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476
    When I try to place simlpe Select SQL query I got error:
    OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "MyLinkedServer" returned message "The Microsoft Access database engine cannot open or write to the file '\\myfileserver.mydomain.com\files\mydatabase.mdb'. It is already opened exclusively by another
    user, or you need permission to view and write its data.".
    I do not have any other program using my access database, and user has full control. I am trying to use in security mode - "For a login not defined in the list above, connections will be made without using a security context", i have also tried all four options.
    I am confused becouse it works from SQL server but from any SQL client domain member computer/server it does not work.
    I have same problem in another environment where I have Windows Server 2008 R2 and SQL 2008 R2 SP2.
    Please help.
    -- Hrvoje Kusulja

    NTFS must be fine since it works from same server using same accounts.
    As I understand, adding my access file to Access trusted location could be a problem. I have tried now to add my access database file location to trusted locations for user which is my SQL service user (Windows Service - AD managed service account MYDOMAIN\SQL1$)
    and my test user which I use to connect to sql server as a client from sql management studio. (Account is Domain Admins and have full permissions on SQL server also)
    I have added this .reg:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security]
    [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Documents]
    "LastPurgeTime"=dword:01592874
    "DisablePromptOpenNetworkTrustedDocuments"=dword:00000000
    [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations]
    "AllowNetworkLocations"=dword:00000001
    [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\Location0]
    "Description"="My file server"
    "AllowSubFolders"=dword:00000001
    "Path"="\\\\myfileserver.mydomain.com\\files\\"
    I have done this for SQL service account user and my personal test account as I said. I have tried to logoff and restart sql service and all servers also.
    The same problem still persists.
    Anyway, thank you for giving me a hint.

  • Java, access database( mdb) and java.sql.date

    I having a problem querying my access database with user specified date the code is as follows
    //get results of income from database with respectto dates
         //so u first create the sql.date instances
         private void getResults(){
         String text1=from.getText();//text input is like this 01-01-2005
              String text2=to.getText();
         Date d1=new Date(Integer.parseInt(text1.substring(6)),Integer.parseInt(text1.substring(3,5)),Integer.parseInt(text1.substring(0,2)));
         JOptionPane.showMessageDialog(this,d1.toString());//traces date with 1900 added to year and 1 added to month
         try{
              //custom class DataSource used to connect to database
              Connection conn=DataSource.getConnection("RealFotoInc");
              PreparedStatement ps=conn.prepareStatement("select * from Members where date=?");
              ps.setDate(1,d1);
              ResultSet rs=ps.executeQuery();
              while(rs.next()){
                   System.out.println("going");
                   System.out.println("trial"+rs.getString(3));
         }catch(Exception se){
              JOptionPane.showMessageDialog(this,se);
         }and it prints out nothing I dont know what is wrong

    Whoever put that comment in there about "1900" and so on knew what had to be done. That "Date" class must be "java.sql.Date"; go and read the API documentation of that constructor you are using there. Then adjust the parameters you are passing to it accordingly.

  • Only one user at a time allowed to open MS Access database on a Mac share

    I have an issue trying to open a Microsoft Access database from our Mac OS X Server running on XServe.
    The MS Access file is stored on a Share Point on the XServe. Windows XP clients open the database. The problem is that it will only allow one user at a time to open the file. The has previously been operating fine when it was stored on a Windows server.
    The Group's permissions for this Share Point allow Read & Write.
    Any thoughts would be much appreciated.

    I think you're being misled a bit by the interface: the checkbox labelled "Strict locking" doesn't just allow strict locking, it requires it (and thus disallows byte-range locking). That is, with strict locking enabled, any client that tries to lock any part of the file actually locks the entire file. Access normally depends on byte-range locking to allow different clients to share the database (as long as they aren't trying to modify the same part of it at the same time), but with strict locking the first client locks all others out.

  • List of users who has access to current community

    Hi,
    Is there an API which provides list of users who have access to current community in ALUI? Will there be huge performance impact in retrieving the list of all users who have access to current communty?
    Thanks
    Sampath

    Sorry,
    I am not quite following you..
    Users can only view a community if the permissions exist for that specific community. I dont understand what do you meant by
    "I need to let user type a name and show his/her user ID from the list of users who have access to the current community".
    Are you trying to look at user permissions based on a list of communities existing in the portal? The user can't even get to that community if he doesn't have permissions.

  • Access Database Opens in Read Only for Users

    I just moved an Access Database to a new server (from Server 2003 to Server 2012). From the server, using Office 2010, I can open the database without issue but, if a user try's to open the same database from either a shortcut or mapped with Office 2010,
    they get the message that the database is Read Only. Did I miss a step in moving the database to the new server? Thanks

    Hi,
    Did your user get the error message "You are trying to open a read-only database..."? If it was, please try the following method:
    On the desktop, double-click My Computer.
    Locate the Microsoft Access database that you moved.
    Right-click the database name, and then click Properties.
    In the Properties dialog box, clear the Read-only check box under
    Attributes.
    Click OK to apply the change.
    Open your database in Access.
    Resource:
    http://support.microsoft.com/kb/324666/en-us (It also applies to Access 2010)
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • VB 2008, CR component and MS Acc: how to access with database(not user) pwd

    These are the detail of the query:
    1. MS Access 2003 and later database via OLE DB provide for entry of a u201Cdatabase passwordu201D to provide additional protection.
    2. In VB 2005 and in VB2008 environment I have managed to establish a connection with a database password and open recordsets using ADO connection. See code below.
    Note. stPassword is user password and stDBPassword is database password with the following code:
    With cnn
              'set connection string
              .ConnectionString "Provider=Microsoft.Jet.OLEDB.4.0; Password=" & stPassword & ";Data Source=T:\CPI.mdb;User ID=" & stUser & ";Persist Security Info=False;" & "Jet OLEDB:System database=t:\cpi.mdw;Jet OLEDB:Database Password=" & stDBPassword
              .Open()  
    End With
    3. When using Crystal Reports component supplied with VS 2008 I can only provide USER NAME and USER PASSWORD. No information is available how and where to enter DATABASE PASSWORD to the Crystal Reports component. As a result, Crystal Reports Viewer starts to run. Obviously access is denied because no DATABASE PASSWORD has been provided to the component. A common dialog comes up to enter database password.
    4. User does not necessarily need know the DATABASE password and I am not interested in providing the database password to every user who runs reports. In this project database password serves as a form of protection from tampering with the database structure and contents through the use MS Access to access the database.
    5. Here is the code to demonstrate logon via Crystal Component described above:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    And then in a sub:
        Dim cnnInfo As ConnectionInfo = New ConnectionInfo()
        'cnnInfo.DatabaseName = cnn.DefaultDatabase
        cnnInfo.UserID = stUser
        cnnInfo.Password = stPassword
    No place to input DATABASE password!!!
    Does anyone know how can I input database password or provide a connection string or maybe ADO connection object which is opened within the project code.

    It seems like it is not possible to set the DB level password with the CR Visual Studio bundled version (as stated in the following KB c2010267). You would need to use the full version, and use the code below:
    Symptom
    A VB .NET application uses Crystal Reports for Visual Studio .NET as the reporting development tool.
    A report is created that connects to a password protected Microsoft Access Database.
    How do you pass a password (for database level security) or a password and user ID (for user level security) at runtime using the different connection methods(Native/ODBC/OLEDB)?
    Resolution
    To pass the database level password or a user level
    userid/password at runtime, use the following code
    sample:
    'Add the following namespaces to the top of the code
    'page
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Dim crReportDocument As New ReportDocument()
    Dim crConnectionInfo as New ConnectionInfo
    Dim crtableLogoninfo As New TableLogOnInfo()
    Dim CrTables As Tables
    Dim CrTable As Table
    crReportDocument = New CrystalReport1()
    With crConnectionInfo
    <**Insert code from below depending on the type of
    connection and the version of Crystal Reports you are
    using**>
    End With
    CrTables = crReportDocument.Database.Tables
    For Each crTable in crTables
    crTableLogonInfo.ConnectionInfo =
    crConnectionInfo
    CrTable.ApplyLogOnInfo(crTableLogOnInfo)
    Next
    CrystalReportViewer1.ReportSource =
    crReportDocument
    Database Level Security
    " For Native and ODBC connections, use the following
    code:
    .Password = "Password"
    " For OLEDB connections, use the following code:
    .Password = chr(10) + "Password"
    ====================
    NOTE:
    You cannot set a database level password when
    using Crystal Reports for Visual Studio .NET 2002 or
    2003.
    ====================
    User Level Security
    " For ODBC and OLEDB connections, use the following
    code:
    .Password = "Password"
    .UserID = "UserID"
    For ODBC connections, in the ODBC data source, you
    have to point the system database to the appropriate
    MDW file. In addition, click the 'Advanced' button and
    specify the User ID and password.
    ====================
    NOTE:
    You cannot set a user level password when using
    a native connection with Crystal Reports 9.2 and
    Crystal Reports for Visual Studio .NET 2002 or 2003.
    This KB is valid for:
    CRYS REPORTS VS .NET.9.1
    CR FOR VS .NET 2005
    CR FOR VS .NET 2008

  • Access current user's manager name in the console application ( through Client object model)

    Hi Guys,
    Is there any way to retrieve current logged-in user's Manager name in the console application.
    As I don't have access to the server where SharePoint 2010 is installed so I wanted to access through client object model.
    arun singh

    Unfortunately, you can't use CSOM to do this in SharePoint 2010 (you can in SharePoint 2013!), but you CAN use the User Profile Service .asmx web service to accomplish this. You need to call the
    GetUserProfileByName method exposed
    in the http://<yourServerName>/_vti_bin/UserProfileService.asmx web service. Pass in the user name for the current user and Manager will be one of the properties that is returned.
    Here is a link to a blog post with example code.
    Please mark my reply as helpful (the up arrow) if it was useful to you and please mark it an answer (the check box) if it answered your question! Thank you!
    Danny Jessee | MCPD - SharePoint Developer 2010 | MCTS - SharePoint 2010, Configuring
    Blog: http://dannyjessee.com/blog | Twitter: @dannyjessee

  • Denying unwanted access for a user to a database

    Hi,
    Is there a mechanism in Oracle using which we can deny access to a user based on invalid login attempts made ? For example, in case a user logs in for the first time with an incorrect password, does the same the second time also, so at his third attempt, can we block the user and prevent login for say 24 hours ?
    Thanks and Regards,
    Mohan.

    Although I have not addressed this issue myself, it seems that it would be possible to setup this functionality yourself.
    1) Make sure you have auditing turned on.
    2) Create a logon trigger that searches audit logs for user from the terminal you are interested in and raises an application error if there as been 3 or more failed "create session" attempts in the last 24 hours.
    Regards
    Tim Boles
    Well this was fun....I am not sure it is "full proof" but I had fun trying to figure it out...took a little bit of researching on google and through the Oracle documents but hey you can tailor it to your needs.
    Turn auditing on
    Update your initialization file to have audit_trail=true
    bounce the database
    As sysdba
    SQL>audit create session;
    SQL>
    create or replace trigger logon_time after logon on database
    declare numfailed number;
    begin
    select count(1)
    into numfailed
    from dba_audit_trail
    where ACTION_NAME='LOGON'
    and RETURNCODE=1017
    and USERHOST=(select sys_context('USERENV','HOST') FROM DUAL)
    AND USERNAME=(select sys_context('USERENV','SESSION_USER') FROM DUAL)
    and timestamp>trunc(sysdate);
    if numfailed > 2
    then
    RAISE_APPLICATION_ERROR(-20001,'Not Allowed to Logon Database failed 3 times within 24 hours');
    end if;
    end;
    SQL>connect scott/scotttest
    Connected.
    SQL>connect scott/asfasdf
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL>connect scott/asfasdf
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL>connect scott/asfasdf
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL>connect scott/scotttest
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: Not Allowed to Logon Database failed 3 times within 24 hours
    ORA-06512: at line 13
    Edited by: Tim Boles on Apr 13, 2010 9:52 AM

  • Custom Search Results web part: show only sites wherein the current user has access

    Hi,
    I'm trying to create a custom Search Box and Search Results web part in one of my web application. The search result should show only sites wherein the current user only has an access. Do you have an idea how to implement this? Thanks. :)
    Regards,
    Napster

    Hi Napster,
    From my experience, we can only search the result which we have view permission at least.
    Please provide more information about your requirement if there is misunderstanding.
    More information about search result web part:
    http://technet.microsoft.com/en-in/library/gg549987(v=office.15).aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Storing easy to access information about current user

    Hi everybody!
    Does someone know if I could store somewhere an information about the current user and that a could retrieve anytime in a similar way I can retrieve the username of the current user when I do 'select user from dual' ? I would like each new session opened to pass a different information even if it is the same user.
    Would the table user_users be a good place to store this information ? Does it store a new record for each session ? If yes, where is it and how could I modify its structure (new column) or its data ? Or maybe I should create a similar table that I would update myself with each new session.
    Thanks,
    Denis.

    I dont remember that Oracle keeps the information persistent anywhere of the session after the session is over. If your session is on than the info is in the V$session.
    The way around could be that you enable some logon trigger and capture thelogin credentials of all teh users in some table of yours and check it later on.
    I would like each new session opened to pass a different information even if it is the same user.
    I didnt get this part. Every time the info willbe by default different right? It will be a new session id, serial number all the time.
    Would the table user_users be a good place to store this information ? Does it store a new record for each session ? If yes, where is it and how could I modify its structure (new column) or its data ? Or maybe I should create a similar table that I would update myself with each new session.
    Well for sure the user_users contains the info of the current users but in NO WAY you shoudl think about tempering this view by yourself as its a part of oracle's own data dictionary. Changing any part of that will leave your database in the unsupported state.
    The other option to create a table similar like this of your own will be a good idea.But before that I guess you should reply to Justin's questions what exactly you want to track?
    Aman....

  • Script to find the list of Queries currently running in database with User Login Name and Host Name.

    Hai,
    How to find the list of queries currently running in the Database with User Login Information.
    Since my database application is running slow, to find the slow queries.

    Try the below query
    SELECT r.start_time [Start Time],r.session_id [SPID],
    DB_NAME(database_id) [Database],
    s.host_name,
    s.program_name,
    s.login_name,
    SUBSTRING(t.text,(r.statement_start_offset/2)+1,
    CASE WHEN statement_end_offset=-1 OR statement_end_offset=0
    THEN (DATALENGTH(t.Text)-r.statement_start_offset/2)+1
    ELSE (r.statement_end_offset-r.statement_start_offset)/2+1
    END) [Executing SQL],
    r.status,command,wait_type,wait_time,wait_resource,
    last_wait_type
    FROM sys.dm_exec_requests r
    OUTER APPLY sys.dm_exec_sql_text(sql_handle) t
    inner join sys.dm_exec_sessions s
    on s.session_id = r.session_id
    WHERE r.session_id !=@@SPID -- don't show this query
    AND r.session_id > 50 -- don't show system queries
    ORDER BY r.start_time
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Converting a pre-Access 2000 database w/ user-level security to Access 2010

    Hi -
    An old database was passed down to me and I'm tasked with converting it so that we can use it with Access 2010. Sounds simple. However, I'm blocked in every attempt that I make to convert, export, and, in some cases, modify the database, due to not
    having the "appropriate permissions". We (my manager and I) do not know the original owner, and we do not have the original workgroup file. I've had our IT guy check to make sure I am the system admin on my machine in hopes of that making a
    difference - I was even able to create new workgroups and add and remove users to and from those groups but when I tried to convert (or save) the database, write some vba code behind the database, create and save new forms, or even update certain tables,
    I'm told to contact my system administrator or original owner of the object about giving me the "appropriate permissions" to do either of those things. I'm out of ideas here. I've even had a team of people contribute ideas as to how I can get around
    this. I cannot even convert this old database (which is in .mdb format, fyi) to an MDE. Is there any way that the user-level protection can be removed from this database? I'm hoping for an alternative other than to start over from scratch.

    Hi,
    As you said that the .accdb format does not support replication or user-level security, we need to use the MDB format in Access 2010. Please try to follow the steps to remove the user-level protection:
    1.Start Microsoft Access, and log on as a member of the Admins group.
    This can be the administrator account that you created when you secured the database, or it can be any member of the Admins group. Be sure that you’re using your own security-enhanced workgroup information file when starting Access.
    2.Open the database.
    3.On the Tools menu, point to Security, and then click User And Group Permissions.
    4.In the User And Group Permissions dialog box, assign full permissions to the Users group for the database and all the objects in the database.
    Because all users are automatically part of the Users group, this step has the effect of concealing security again.
    5.Click the Users tab, click Admin in the Name box, and then click Clear Password.
    Clearing the password for the Admin user disables the Logon dialog box that is displayed when you start Access. All users are automatically logged on as the Admin user the next time they start Access. This step disables the Logon dialog box for all databases
    that are using the same workgroup information file.
    6.Restart Access.
    7.Create a new database, and then import all objects from the security-enhanced database.
    You can accomplish this easily by using the Import command (File menu, Get External Data submenu).
    Quote From:
    http://office.microsoft.com/en-ca/office-2000-resource-kit/removing-user-level-security-HA001138118.aspx
    Regards,
    George Zhao
    TechNet Community Support

  • To find the user processes that are connected to a database currently ??

    Hi,
    I wish to find the user processes that are connected to a database currently.
    How to find this ?
    any specific table/view for this ??
    Thanks.

    Hi..
    You can use
    SELECT NVL(s.username, '(oracle)') AS username,
    s.osuser,
    s.sid,
    s.serial#,
    p.spid,
    s.status,
    s.module,
    s.machine,
    s.program,
    TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time
    FROM v$session s,
    v$process p
    WHERE s.paddr = p.addr
    ORDER BY s.username, s.osuser;
    HTH
    Anand

Maybe you are looking for

  • Using two iPods on one account?

    My iPod Mini was recently stolen and I doubt there's much chance of recovering it. So I decided I'm going to get a new iPod, but I'm not sure if it will work with my existing iTunes account. It seems to me that it might not work since it'd invite mas

  • Trackpad with buttons from the new E/T/W 450/550 to E/T/W 440/540

    Hello, i was looking at the new 550 450 series and saw that Lenovo had returned to the old trackpoint buttons. Also i've notised for the short time i was able to take the quick look that the size of the new trackpad + buttons is the same as the track

  • Rejection of open sales order

    Dear Expert, My client wants to close all the open sales order, I tried with VKM3,VA02, VA05, MASS,  given the reason for rejection,but after that when I am going to  VA02 and giving a line item and then going for VL01n, its working. Now I want to st

  • Help me get my IPOD Nano to Sync with

    I had my IPOD Nano sync with ITUNEs however I had to change my account and now I need to find out how to sync with ITUNES again

  • I can't activate my i phone, what is the solution

    i can't activate my 3GS phone, any solution