|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP COM for access
Seem to be having permissions trouble (best guess) getting some com stuff to work.
PHP Code:
I get "Could not open connection". The database file permissions are full control/everyone. in dcomcnfg, everyone has access to launch apps and special access in default configuration permissions. and everyone has full control on the folder as well. This is 2k adv server btw, intel, newest php version. In the path, it cuts out the backslashes , but they're there =)
__________________
David Fells If my post helped you, please click the above my post and leave a comment. Thanks
|
|
#2
|
||||
|
||||
|
My guess is that since you said devshed it cutting the back slashes, you are using something like this with a double backslash before the filename to avoid php thinking \t is a tab.
$db->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\wwwroot\accessDB\\testDB.mdb;"); What you need to do, is use double backslashes everywhere, or use single quotes, so php will actually use the \ literally rather than take them out as escape characters. PHP Code:
|
|
#3
|
|||
|
|||
|
That wasn't the problem, I had the code there correct in my program, it was a permissions thing. New problem though =()
I run a query but can't print any results. PHP Code:
No output. There is 1 row of data in the table. |
|
#4
|
||||
|
||||
|
Why don't you simply use php's odbc functions? They seem to work well!
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#5
|
|||
|
|||
|
never used them before, and i'm familiar with ADO from working in asp
|
|
#6
|
|||
|
|||
|
I was able to connect to and query fields from an Access DB using the following code.
PHP Code:
You may be able to get the results you're looking for by adding the $rs->movenext() to your while loop. The way you have it coded right now, it's only going to return the first record every time it loops through the recordset. If the field you're trying to print happens to be blank in that first record, you're not going to get anything. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP COM for access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|