Reply to Re: php dsnless connection for MS Access

Your name:

Reply:


Posted by Jim Michaels on 01/23/06 07:09

there are no Jet or MS Access library functions in the default PHP. there
is no way to do a dsn-less connection with PHP. You are stuck with ODBC.
There are multiple ways to use the DSN, such as COM. I found this in the
notes section of the extended CHM manual of PHP when I searched for "MS
Access"
but it is a DSN connection...

Hello!
This code appears work fine and fast to me, like mysql or msaccess.
The server is working for an Intranet home page.
<?php
$db = new COM("ADODB.Connection");
$dsn = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
Catalog=tsos;Data Source=(local);Application Name=SellCar";
$db->Open($dsn);
$rs = $db->Execute("SELECT * FROM states order by name asc");
while (!$rs->EOF)
{
echo $rs->Fields['name']->Value."
";
$rs->MoveNext();
}
?>
Diego Bandeira.



"MrsBean" <linda@burnsidebiz.com> wrote in message
news:1137952986.185748.122670@g49g2000cwa.googlegroups.com...
> I've been working on learning how to use PHP with MS Access, and as
> long as I use ODBC, I can make it work. I want to use a DSNless
> connection. Everthing I have tried has failed. Can anyone show me a
> simple example?
>
> MrsBean
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация