3.56 and PHP

Rasmus_Torpe
Member Posts: 10
Hi
I'm trying to make a connection from a Navision 3.56 database to a website through ODBC and PHP.
I've managed to create a System DSN and tested it with MS Excel XP and it works fine.
But when i try to connect to my SystemDSN using PHP nothing happens... :?:
no error message. It just takes forever to load the webpage into IE and eventually it is timed out.
Here's my PHP code:
<?php
$db = odbc_connect("SysNavi","",""); // password and user not defined
$SQLresult = odbc_do($db, "SELECT Nummer, Navn FROM Kreditor");
While (odbc_fetch_row($SQLresult))
{
$num = odbc_result($SQLresult,1);
$name = odbc_result($SQLresult,2);
echo "number: " + $num + "name: " + $name;
}
odbc_close($db);
?>
any help would be appreciated....
Rasmus Torpe
I'm trying to make a connection from a Navision 3.56 database to a website through ODBC and PHP.
I've managed to create a System DSN and tested it with MS Excel XP and it works fine.
But when i try to connect to my SystemDSN using PHP nothing happens... :?:
no error message. It just takes forever to load the webpage into IE and eventually it is timed out.
Here's my PHP code:
<?php
$db = odbc_connect("SysNavi","",""); // password and user not defined
$SQLresult = odbc_do($db, "SELECT Nummer, Navn FROM Kreditor");
While (odbc_fetch_row($SQLresult))
{
$num = odbc_result($SQLresult,1);
$name = odbc_result($SQLresult,2);
echo "number: " + $num + "name: " + $name;
}
odbc_close($db);
?>
any help would be appreciated....
Rasmus Torpe
Regards
Rasmus Torpe
Rasmus Torpe
0
Comments
-
Well here I am replying to my self. But I found the answer so I think it's fair...
The reason that it wouldn't work is because the Navision 3.56 ODBC requeres access to the system32 folder! Once I had allowed this, the query succeded and I got my result.
regards,
RasmusRegards
Rasmus Torpe0 -
Hello,
I need an acces from our WebPage (ISP server, PHP, FreeBSD) to the Navision database (a server in our company, Win2000, Navi 3.56). Will it work :?: :?: :?: I cannot check it because I do not have an ODBC driver :? . So, I ask you before I ask my boss to pay for the ODBC driver.
Thx for help,
Rafal0 -
Hello Rafal,
I haven't tried using PHP from one computer running FreeBSD to access a database on a Win2000 server, so my reply is based on a qualified guess... :!:
It's not straight forward as I see it because you cannot directly access the ODBC driver on a win2000 from FreeBSD. The ODBC needs to be on your FreeBSD computer and I don't know of any Unix ODBC driver to Navision...
So my "solution" is this:
1. install Navision 3.56 ODBC on Win2000
2. install an ODBC socket server on Win2000, thereby making an interface to the FreeBSD server to connect to. Here's a link to ODBC socket server:
http://odbcsock.sourceforge.net/
3. connect to the socket server from PHP/FreeBSD. This could be tricky... :?
Hope this helps your decision!
Rasmus TorpeRegards
Rasmus Torpe0 -
Hello im from denmark.
Are you using Naviosion 3.56a or do you have it lying around somewhere? I really need a license for it, because my license to 3.55 is not working in 3.56, and i cant buy it anywhere.
It would be trufully nice of you, if you could help me..
Hilsen Mikkel0
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