kalo pingin connection file database Access dengan PHP tanpa harus set di ODBC control panel; pakai cara ini:
include('adodb.inc.php');
$conn= &ADONewConnection("ado_access");
$access = $DOCUMENT_ROOT.'/sms/UsbModem.mdb';
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
. 'DATA SOURCE=' . $access . ';';
//. 'USER ID=;PASSWORD=;';
@$conn->PConnect($myDSN, "", "", "");
kalo ada file mdbnya ada passwordnya pake cara diatas kok error terus ya ? Pake cara ini jalan.
include('adodb.inc.php');
ADOLoadCode("ado_access");
$db = &ADONewConnection("ado_access");
$myDSN="Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\AppServ\www\sms\UsbModem.dat;Uid=Admin;Pwd=LongCheer;";
$db->Connect($myDSN);
$rs = $db->Execute("select * from sms");
maunya bikin sms gateway tapi baru belajar connection aja udah problem.
Sunday, December 28, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment