Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

RegEx

AboveyouAboveyou Posts: 1Member
Hi,

i wrote a phone book in perl (gui-tk) all the users details are located in MS access database, i need a few regex "pointers" on how to do a search on access database for example:

*.user name "john dow" (located in a single table) i want it to display the entire row of user details (username,mail etc...) by just type "j" or "on" or just "john" or "dow" etc...


Comments

  • leeb003leeb003 Posts: 12Member
    use DBI;
    $db_handle = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb);dbq=C:path to access.mdb');

    $get = "SELECT * FROM default_table WHERE user_name = 'jon'";

    $statement = $db_handle->prepare($get)
    or die "couldn't prepare query '$get': $DBI::errstr
    ";

    $statement->execute()
    or die "Couldn't execute query '$sql': $DBI::errstr
    ";

    ...haven't tested but something like this should work.
Sign In or Register to comment.