[PHPwestoz] MYOB ODBC error

Peter Sutter sutterp at sopac.com.au
Fri May 8 02:27:12 EST 2009


Is the MYOB company file configured for ODBC? Make sure?

Can you access the MYOB database via ODBC on windows? i.e. via msquery?

Little Systems has created an Open Source MYOB ODBC Bridge to Linux.
See: http://www.littlesystems.com.au (Downloads)

Peter

On Wednesday 06 May 2009 12:36, Daniel Antonic wrote:
> Hello all
>
> I'm writting a program that will interface a customer's MYOB database file
> with her web site so that people can pay online, and it is all recorded in
> her MYOB file immediately.
>
> MYOB Accounting V18 is running in Windows XP Pro, I have set up a System
> DSN, but PHP just cant see the database. I got this snippet of code from
> another web site:
>
> <?php
> # connect to a DSN "mydb" with a user and password
>
> $connect = odbc_connect("test","", "");
> echo $connect . "<P>";
> # query the users table for name and surname
> $query = "SELECT * FROM Employees";
>
> # perform the query
> $result = odbc_exec($connect, $query) or die ("cannot find table");
>
> # fetch the data from the database
> while(odbc_fetch_row($result)){
>   $name = odbc_result($result, 1);
>   $surname = odbc_result($result, 2);
>   print("$name $surname<br>\n");
> }
>
> It fails at $result, I put in the DSN name, username and password in the
> odbc_connect() directive. I really need help on this, please!
>
> Kind regards,
> Daniel Antonic
> Proprietor DCN Solutions
>
> Mob: 0438 303 429
> Web: dcnsolutions.net



More information about the PHPwestoz mailing list