I keep getting the following error message

PHP Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\DDEDSite\nisia\rodos.php on line 101

I am using iis WIN server 2003 and have started odbc service.

Any suggestions?

    I find it too funny that I have a similar error and came here looking for an answer. I'll post behind you and maybe we get get [solved] together .

    I'm trying to ODBC connect to providex database using ODBC. Now I got it to work on my developer server, using IIS 5 and XP Professional 2002. So the code works. I've seen it work.

    But when I put it on the Main server running Windows Server with IIS 6 I get this crapped out Error.

    Error in SQLPHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [ProvideX][ODBC Driver][FILEIO]Table is not accessible, SQL state S0000 in SQLExecDirect in c:\Inetpub\wwwroot\ItemView2.php on line 58

    Can anyone help me out? I'm fresh out of Ideas.

    Here is the source code jik you need to see it.

    $sql="SELECT IM2_InventoryItemWhseDetl.QtyOnHand, IM2_InventoryItemWhseDetl.WhseCode FROM IM2_InventoryItemWhseDetl WHERE (((IM2_InventoryItemWhseDetl.ItemNumber)='$prtnum'))";
    $rs=odbc_exec($conn,$sql);
    if (!$rs) {
    exit("Error in SQL");
    }
    while (odbc_fetch_row($rs))
    {
    $Loc=odbc_result($rs, "WhseCode");
    $Qty=odbc_result($rs, "QtyOnHand");
    echo "<tr><td>$Loc</td><td>";
    if ($Qty < 1) { echo"<td class='small' align='left'>OUT<IMG SRC='sRed.gif' ALT='On Back Order' border='0' height='18' width='18'></td>";}
    else { echo"<td class='small' align='left'>IN<IMG SRC='sGreen.gif' ALT='In Stock' border='0' height='18' width='18'></td>";}
    echo"</tr>";
    }
    odbc_close($conn);
    $i++;
    }

    r/s
    Learning Fast

      22 days later
      Michalis wrote:

      I keep getting the following error message

      PHP Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\DDEDSite\nisia\rodos.php on line 101

      I am using iis WIN server 2003 and have started odbc service.

      Any suggestions?

      You get this error if the database is already open. If you close the database, it should work.

        19 days later
        GLawas wrote:

        I'm trying to ODBC connect to providex database using ODBC. Now I got it to work on my developer server, using IIS 5 and XP Professional 2002. So the code works. I've seen it work.

        I was able to solve this problem by setting up a System DSN for the MAS 32-bit ODBC driver, and filling in the "Views DLL" option on the "Options" tab (along with the "Database Directory" option on the "Basic" tab, of course).

        Here's what to do (Windows XP or 200x):
        1. Go to Control Panel->Administrative Options->Data Sources (ODBC)
        2. Click on "System DSN" tab (THIS IS VERY IMPORTANT).
        3. Click on "Add" button.
        4. Choose "MAS xx 32-bit ODBC Driver" from the list, and click "Finish."
        5. Under Data Source Name, create a name for this DSN. (This is the same name that you will use with "odbc_connect($DSN_NAME)".
        6. Fill in the Database Directory. I used the UNC here (aka the Network Path, like "\mas_server_name\mas_share\folder_containing_providex_ddf").
        7. Click on the "Options" tab.
        8. Fill in the "Views DLL" option with the UNC path to the "pvxwin32.dll" file. (For me this was the "Home" subfolder..."\mas_server_name\mas_share\folder_containing_providex_ddf\Home".)
        9. Click OK, and you should be ready to rock. 🙂

          Write a Reply...