Results 1 to 4 of 4

Thread: Win32::ODBC

  1. #1
    Join Date
    May 2002
    Posts
    16

    Unanswered: Win32::ODBC

    Does anyone have any experience with the Win32::ODBC Perl module. If so, maybe you could help me with a problem.

    I keep getting a runtime error when the script is run that says that the database could not be opened. That it is already opened or that I do not have permission to open it.

    I know that it is not currently opened. Also, I have granted full permissions on the folder that houses the DB, the DB itself, the folder that contains the company intranet, the folder that houses the script, and the script itself.

    Any ideas?

    Greg

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    A code snippet and the connection string could help in understanding your problem better.
    Blank out user info and passwords

  3. #3
    Join Date
    May 2002
    Posts
    16

    Code

    use Win32::ODBC;

    if (!($db = new Win32::ODBC("ISDB"))){
    print "Error connecting to ISDB\n";
    print "Error: " . Win32::ODBC::Error() . "\n";
    exit;
    }

    $db->Sql("INSERT INTO techissue (ticketnumber, date, practicename, contact, phone1, issuetype, explanation) " .
    "VALUES ($convalue, $dtvalue, $pvalue, $nvalue, $phvalue, $prob, $dvalue)");

    $db->Close();


    Hope this can shed some light. It prints out the error messages at the top, so I know that it is not even connecting.

  4. #4
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    just found on the Win32::ODBC FAQ

    The MS Access driver (the "Jet Engine") will always attempt to write a file named the same as your database but with an .ldb extension. This contains info on who is currently using the database, from what computer, etc. The Access driver also writes temporary files to perform it's work. If the account running the script does not have write (or add) permissions on the directory the script is running from, the Access driver will fail because it can not write these temporary files.
    maybe this is it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •