Archive for ‘Uncategorized’

November 16th, 2011

Windows 7 Home Edition Connection to UNIX Server

The following article discusses editing your computer’s registry. Such action may lead to serious issue with your computer if not done properly. This website and it’s contributor’s assumes none responsibility for any of the information provided. Follow these steps at your own risk!

I was recently helping a colleague who had hit a wall with regards to configuring a client’s new computer which was running Windows 7 Home Edition with their Unix file server and database server (heart of their business).

Now, if you perform a search online, you will find numerous articles which explain that you can in fact connect Windows 7 to a UNIX server, but you have to ‘dumb it down a little’. To do so, you need to make 2 modifications to your Security Policies.

Go to Control Panel -> Administrative Tools -> Local Security Policy (Or Run secpol.msc)
Local Policies – Security Options

Locate the Network security: LAN Manager authentication level Policy
Change the Local Security Setting to Send LM & NTLM responses

Locate the Minimum session security for NTLM SSP Policy
Uncheck the Local Security Setting Require 128-bit encryption property

The problem is the fact that this may work if you are running Windows 8 Professional or Ultimate, but on Windows 7 Home Edition, the Local Security Policy Management Console is not available. So what is one to do?

Well, you can get around this problem, but you must edit 2 registry keys!

Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa Key and then create a new DWord Key

ValueName: LmCompatibilityLevel
ValueData: 1
Base: Hexadecimal

Navigate to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\LSA\MSV1_0 registry key and edit the NtlmMinClientSec Key and change it to 0

Finally, reboot your computer. You should now be able to access your UNIX server files without the never ending login prompt…

Tags:
November 7th, 2011

MS Access – VBA – Run Parameter Query in VBA

Once one delves into the wonderful world of MS Access & VBA programming, you quickly gets faced with the problem of executing queries and SQL statements from within VBA. No in general, this does not pose much of an issue and there are any number of great tutorials that cover the various way to handle this. For instance, Database Journal has a great article by Danny Lesandrini entitled Executing SQL Statements in VBA Code which covers all the methods available to a developer and explains the pros and cons of each.

That said, all of these articles cover but the basic idea of a simple SQL Statement. What happens if you want to execute a parameter query? How do you approach that. In fact, this isn’t to big an issue either, once you are shown how to handle it.

Firstly, let us very briefly cover the subject of a Parameter. What is a parameter? In a query, we can specify a criteria. In most instances, the criteria will be a static value. That said, it become necessary in many instances to make these criteria dynamic, and to do this there are different methods, but one common approach is to refer to a control on a form, thus allowing the end-user the ability to specify the criteria to apply to the query. This is what I am referring to in this post.

The problem arises that if you merely try to execute a query with a criteria to a form control, it will result in an error “Too Few Parameters”. The work around is that we much first make the database evaluates each parameter before running the query, to do so, we use the following code

    Dim db              As DAO.Database
    Dim qdf             As DAO.QueryDef
    Dim prm             As DAO.Parameter
    Dim rs              As DAO.Recordset
 
    Set db = CurrentDb
    Set qdf = db.QueryDefs("YourQueryName")
 
    For Each prm In qdf.Parameters
        prm = Eval(prm.Name)
    Next prm
 
    Set rs = qdf.OpenRecordset
 
    'Work with the recordset

    rs.Close 'Close the recordset
    'Cleanup after ourselves
    Set db = Nothing
    Set qdf = Nothing

So how does it work exactly? Well, we start off by specifying which query we are working with by setting the value of the qdf variable. Next, we llop through the parameters and evaluate each one. Finally, we execute the query. So simple, once you are shown the proper tachnique!

You may wish to look over the sample database found at Roger’s Access Library entitled Too few Parameters.

November 21st, 2010

PC Information HTA

PC InformationA simple HTML Application (HTA) which can retrieve an extensive set of information on various computer aspects. Currently, it can return information on hardware, printer, memeory, cpu and hard drives, processes, video and audio,… It can also query other computers (as long as you have admin priviledges on the remote machine). Simply add remote computer names to the associated text file.

Download the sample database: PC Information Utility HTA