The Linux Page
  • When creating a CD you use mkisofs (make ISO file system)

        mkisofs -o my-cd.iso directory
    

    Then you should verify that it looks as you expected. This is done by mounting the ISO file:

        sudo mount -o loop my-cd.iso /mnt/cd
    

    Assuming the mount works, you can then use ls to see the content of the ISO file:

        ls -l /mnt/cd
    

    Note that if you want to make the CD bootable, you'll need to also add the boot sector to the my-cd.iso file.

    Something like this should get you there:

        mkisofs -o my-cd.iso -b iso.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table
    
    
  • As I was trying to debug a problem using an STL vector, I looked at the resulting assembly and saw this strange thing:

    mov eax,dword ptr fs:[0000000h]

    And a little further down, the opposite:

    mov dword ptr fs:[0000000h],eax

    These statements are from VC++ so the first is "put fs:[0] in eax" and the second is "save eax at fs:[0]".

    Curious I looked around and found a page describing what's really hapenning. If you need to know, that's actually initializing the exception structure for this function. The fs:[0] location is where that structure pointer is saved ...

  • Moving a website to a new server

    Now and again, you have to move a website from one server to another.

    There are good and bad things about that, the main problem is with dynamic websites. Why is that? Simple: a dynamic website expects to access a database and if you hit the wrong server, that will go bad.

    What's the best solution?

    1. Install your website on the new server, make sure it loads okay (you may want to use a test sub-domain name to make sure, although that's not a rock solid proof since some things may use a fully qualified URL)

    2. Change the IP address in your ...

  • MS-Access can be programmed with VBA which is neat. I do that a lot because the default forms do not allow you to strongly verify the data validity or even better: prevent you from editing certain record because they are too old, you don't have permissions, it was already archived in some way (i.e. invoice paid), etc.

    However, I often encounter problems with the focus. The main thing I do to make it as safe as possible is show or hide buttons. If you cannot activate function A, then there is no point in having a button for function A. Instead, we should hide the function A button when we ...

  • Problem

    As I'm working with MS-Access, I'm learning all sorts of things.

    I had to write my own SQL because the database management was such that a simple form just did not fit well (i.e. things like multiple unique keys to be checked between MS-Access and a QuickBooks database...)

    The SQL is relatively easy to write (there are a few tricks with MS-Access, for instance, dates are written between hash characters: #2009/01/01 00:00:01# and you cannot use all balls or it fails!)

    Now, I tried to use the same form to:

  • In VB and MS-Access, whenever a variable referencing an object is set to Nothing, you cannot access any field since the variable does not actually point to a physical object.

    This, code like this breaks:

    	Dim r Is Object 
    	r = Nothing 
    	...
    	r.Field = 5  ' Breaks if r is still Nothing
    

    Thus, you need to test whether the variable r is defined.

  • Today I got this weird error: Application-defined or object defined error.

    Looking into it, I could not find the right answer.

    The failing code was in a sub-form and when called it generated the error immediately. The code I wrote was:

    Parent.NewSelection

    And of course, in the parent I had the NewSelection function defined:

    Private Sub NewSelection
        DoSomething
    End Sub

    The DoSomething would update a button as required...

    For real MS-Access pros, you may already have noticed what the problem was. What's really annoying is that the error we get is not capable of telling ...

  • As most people know, all of the MS-Office macros are written in Visual Basic.

    Visual Basic is for sure a huge whole lot better than the BASIC I had on my Apple //c. For one thing, it does not require line numbers and you can declare functions, procedures, and have local variables (FOR loops that use the variable I do not overwrite the variable I of the FOR loop from the calling function!)

    Since MS-Access 2007, we have the possibility to create classes!

  • To define a constant in MS-Access, use the Const keyword as in:

    Private Const varname = "Some value"
    

    The value can be a string, integer, floating point. The variable can be made public in which case it is global among all modules and forms.

    The value after the equal sign must be constant at time of compilation which is why it is limited to strings, integers and floating point values.

  • Today I experienced a hard lock-up with MS-Access as I was in a form typing a new query.

    The new query data is checked first, if valid, then the query is processed and ends in a SELECT SQL order which I save in the Form with a simple OpenRecordset call as in:

    sql = "SELECT stuff FROM thing WHERE foo LIKE 'begin*'"
    Set CUSTOMER_LIST.Form.Recordset = CurrentDb.OpenRecordset(sql)

    That used to work just fine in older versions of MS-Access, but we now use MS-Access 2007.

    The hanging happens on the 2nd line, when the Set occurs. Note that it generally happens the second

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.