<html> <body> <? $conn = odbc_connect("test","",""); $query = "select dni, nombre, direccion from clientes"; $rs = odbc_exec($conexion, $query); ?> </body> </html>And the result is:
Warning: odbc_connect(): SQL error: [Simba][SimbaEngine ODBC Driver][DRM File Library]The operating system cannot gain access to the file C:\Archivos de programa\Microsoft Business Solutions-Navision\Client\database.fdb .Please check that the file type and attributes are correct. Error: 5, SQL state S1000 in SQLConnect in c:\inetpub\wwwroot\index.php on line 6 Notice: Undefined variable: conexion in c:\inetpub\wwwroot\index.php on line 10 Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in c:\inetpub\wwwroot\index.php on line 10
Answers
Make sure the file is both readable and writable (check the attributes), that it's not hidden, and that everyone has sufficient NTFS rights (assuming you do use an NTFS partition)
Viewing Navision data using ASP
NAV 4.0, ASP and ODBC
[SOLVED] Navision - PHP/SQL search
[FIXED] Navision ODBC connection with PHP
These topics could get you started.
- Poltergeist: That´s exactly the problem!, when I changed the attributes from the file always was correct.
- Luc Van Dyck: Thank you for your links, I´m sure that will be very helpfull for me