php using odbc
am 27.01.2007 02:40:47 von bedul
can u help me?
1.i wanna build a connection using odbc but i don't have any example.
what url can i visit?
2. odbc i want to connect was on this url.. plz view to help me.
http://indoupload.net/files/view/803/odbc%20problem.jpg
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php using odbc
am 27.01.2007 03:44:13 von Vicente
look this as one example of MSAccess connection:
--------
$sDefaultDir = 'C:\apache\htdocs\MDB'; // path dir MDB
$sMDBfile = "cop.mdb"; // MSaccess database name
$sMDBpathAndFilename = $sDefaultDir.'\\'.$sMDBfile; // concatenate
// define dsn
$sCfg_dsn = "DRIVER=Microsoft Access Driver (*.mdb);
DBQ=$sMDBpathAndFilename;
UserCommitSync=Yes;
Threads=3;
SafeTransactions=0;
PageTimeout=5;
MaxScanRows=8;
MaxBufferSize=2048;
DriverId=281;
DefaultDir=$sDefaultDir";
// if you need login and pass
$sCfg_dsn_login = "";
$sCfg_dsn_mdp = "";
$hConn = odbc_connect( $sCfg_dsn, $sCfg_dsn_login, $sCfg_dsn_mdp ) or
die( "Not connection." );
$sql = "select * from table";
$result= odbc_exec($hConn,$sql);
while(odbc_fetch_row($result))
{
$db_field1 = odbc_result($result,"field_name");
}
?>
----------------
check rest of odbc function in php manual.
bye,
you wrote:
> can u help me?
> 1.i wanna build a connection using odbc but i don't have any example.
> what url can i visit?
> 2. odbc i want to connect was on this url.. plz view to help me.
> http://indoupload.net/files/view/803/odbc%20problem.jpg
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php using odbc
am 27.01.2007 04:39:35 von bedul
thx for your info and example
i hope i can use the link i gave in previous message
i want to connect to there
----- Original Message -----
From: "Vic"
To:
Sent: Saturday, January 27, 2007 9:44 AM
Subject: Re: [PHP-DB] php using odbc
>
> look this as one example of MSAccess connection:
>
> --------
>
> $sDefaultDir = 'C:\apache\htdocs\MDB'; // path dir MDB
> $sMDBfile = "cop.mdb"; // MSaccess database name
>
> $sMDBpathAndFilename = $sDefaultDir.'\\'.$sMDBfile; // concatenate
>
> // define dsn
> $sCfg_dsn = "DRIVER=Microsoft Access Driver (*.mdb);
> DBQ=$sMDBpathAndFilename;
> UserCommitSync=Yes;
> Threads=3;
> SafeTransactions=0;
> PageTimeout=5;
> MaxScanRows=8;
> MaxBufferSize=2048;
> DriverId=281;
> DefaultDir=$sDefaultDir";
>
> // if you need login and pass
> $sCfg_dsn_login = "";
> $sCfg_dsn_mdp = "";
>
>
> $hConn = odbc_connect( $sCfg_dsn, $sCfg_dsn_login, $sCfg_dsn_mdp ) or
> die( "Not connection." );
>
> $sql = "select * from table";
> $result= odbc_exec($hConn,$sql);
>
> while(odbc_fetch_row($result))
> {
> $db_field1 = odbc_result($result,"field_name");
> }
>
> ?>
> ----------------
>
> check rest of odbc function in php manual.
>
> bye,
>
>
>
>
> you wrote:
>
> > can u help me?
> > 1.i wanna build a connection using odbc but i don't have any example.
> > what url can i visit?
> > 2. odbc i want to connect was on this url.. plz view to help me.
>
> > http://indoupload.net/files/view/803/odbc%20problem.jpg
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: php using odbc
am 27.01.2007 04:58:31 von Vicente
bedul wrote:
your link doesn't work then I don't know what you want exactly
> thx for your info and example
> i hope i can use the link i gave in previous message
> i want to connect to there
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php