Trying to connect to an *.fdb using NODBC and PHP

kazamax
Member Posts: 13
Hi! I´m very very novice with Navision, I have been using this program only 2 days :oops:
What I need to do: I have to use PHP to list data from a clients table from an *.fdb database.
My problem:
I use this php code:
I think the configuration of the DSN System is correct...
Can anyone help me??
Sorry about my english and my low knowledge... :oops:
What I need to do: I have to use PHP to list data from a clients table from an *.fdb database.
My problem:
I use this php code:
<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
I think the configuration of the DSN System is correct...
Can anyone help me??
Sorry about my english and my low knowledge... :oops:
0
Answers
-
Error 5 means that you don't have sufficient rights to access the database. Are you sure you have to access the database directly (as opposed to through a native server program)?
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)0 -
Have a look at these threads (about ASP, PHP & ODBC):
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.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thank you very much for your help guys!
- 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 me0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions