[PHPwestoz] MYOB ODBC error

Michael Dorrington mike at orbitaldesigns.com.au
Thu May 7 00:37:33 EST 2009


----- Forwarded Message ----
From: Daniel Antonic <daniel at dcnsolutions.net>
To: Michael Dorrington <mike at orbitaldesigns.com.au>
Sent: Wednesday, May 6, 2009 8:41:26 PM
Subject: Re: [PHPwestoz] MYOB ODBC error


Thank you all for the quick response, will post the details as soon as I get a chance to try the driver download (thanks Kim). I havn't got a copy of MYOB on my machine, so it'll take a bit of time. Thanks again for the quick reply!

Kind regards, 
Daniel Antonic 
Proprietor DCN Solutions 

Mob: 0438 303 429 
Web: dcnsolutions.net
----- Original Message ----- 
From: Michael Dorrington 
To: daniel at dcnsolutions.net 
Sent: Wednesday, May 06, 2009 2:02 PM
Subject: Fw: [PHPwestoz] MYOB ODBC error

Does this give you any real message:

$result = odbc_exec($connect, $query) or die (odbc_errormsg($connect));

I've never really done this with myob before, but perhaps you need to give the IIS user permissions to the myob file for reading?

Mike
 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. 



----- Forwarded Message ----
From: Daniel Antonic <daniel at dcnsolutions.net>
To: phpwestoz at lists.linux.org.au
Sent: Wednesday, May 6, 2009 12:36:56 PM
Subject: [PHPwestoz] MYOB ODBC error


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
________________________________
_______________________________________________
PHPwestoz mailing list
PHPwestoz at lists.linux.org.au
http://lists.linux.org.au/listinfo/phpwestoz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/phpwestoz/attachments/20090506/5af56512/attachment-0001.htm 


More information about the PHPwestoz mailing list