linux odbc

juhryniuk
Member Posts: 6
Hi,
I've seen this topic discussed before but it was some time ago. I have a php web application running on Linux that needs to query a native Navision database. I've seen the Easysoft ODBC bridge, but I'm wondering if there are other solutions out there.
Thanks,
I've seen this topic discussed before but it was some time ago. I have a php web application running on Linux that needs to query a native Navision database. I've seen the Easysoft ODBC bridge, but I'm wondering if there are other solutions out there.
Thanks,
0
Comments
-
Hello,
There are several solutions for data communication with PHP (on Linux/Apache) when using a Native Database server.
Here's one..
You can use the 'Navision Socket Bus Adapter' and PHP (fsockopen / fputs) can query XML.
Navision XML Socket Server (NAS, SingleInstance CodeUnit)RUNTRIGGER :>> CREATE(CC2); CREATE(SBA); CC2.AddBusAdapter(SBA, 0); SBA.ReceivingTimeout:= 20000; SBA.OpenSocket(8080, ''); EVENTTRIGGER :>> CC2::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") MyFile.CREATE('c:\tmp.xml'); CLEAR(InMsg); InMsg := InMessage; IsmStr := InMsg.GetStream(); REPEAT Buff := ''; IF IsmStr.READ(Buff, 1024) <> 0 THEN MyFile.WRITE(COPYSTR(Buff, 1)); UNTIL (STRLEN(Buff) <> 1024) OR (IsmStr.EOS); MyFile.CLOSE; MyFile.OPEN('c:\tmp.xml'); MyFile.SEEK(MyFile.LEN - 1); MyFile.TRUNC; MyFile.CLOSE; // Process new xml and return CREATE(Dom); Dom.load('c:\tmp.xml'); IF (InMsg.ExpectReply) THEN BEGIN OutMsg:= InMsg.CreateReply(); OutStr := OutMsg.GetStream(); Dom.save(OutStr); OutMsg.Send(0); END; InMsg.CommitMessage; CLEAR(Dom); CLEAR(InMsg);
PHP XML Webservice Client<?php $host = "127.0.0.1"; // ip of socket server $fp = fsockopen($host, 8080, $errno, $errstr, 5); if ($fp > 0) { fputs($fp, "<?xml version='1.0' encoding='UTF-8'?><bookstore><book><title>The Autobiography of Benjamin Franklin</title><price>9.99</price></book></bookstore>\r\n\0"); while (!feof($fp)) { $response .= fgets($fp); } fclose($fp); echo $response; } ?>
And another one: Soap webservice. Use PHP for soap communication.Met vriendelijke groet, best regards,
Rvduuren0
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