RE: [PHP] ODBC Example?
| From: | Ryan Gaul | Date: | Thu, 29 Jun 2000 17:35:52 +0000 |
| Subject: | RE: [PHP] ODBC Example? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3844@lists.php.net to get a copy of this message | ||
Jason,
Sorry, you have to have a dsn. You should be able to set one up for access,
though, just go into odbc in Control Panel. ODBC needs a DSN, so far as I
know.
ryan
> -----Original Message-----
> From: Jared Walker [SMTP:igjarjuk@tca.net]
> Sent: Thursday, June 29, 2000 3:11 PM
> To: Ryan Gaul; Php-General
> Subject: RE: [PHP] ODBC Example?
>
>
>
> ok, I understand that, but is there a way to NOT use a dsn? (I'm on a 98
> box)
>
> -Jared "Igjarjuk" Walker
> "Life should come with reference drivers."
>
> -----Original Message-----
> From: Ryan Gaul [mailto:rgaul@WETAUTOMOTIVE.COM]
> Sent: Thursday, June 29, 2000 8:36 AM
> To: 'Jared Walker'; Php-General
> Subject: RE: [PHP] ODBC Example?
>
>
> try this.
>
> ryan
>
> <?php
>
> $username = ""; // your username
> $password = ""; // your password
> $dsn = ""; // datasource dsn name
>
> $query = ""/ // your query string
>
> // connect to the dsn
> $odbc_link = odbc_connect($dsn,$username,$password);
> if ($odbc_link) echo "<H1>ODBC Connect Success!</H1>";
>
> // do query
> $odbc_result = odbc_exec($odbc_link,$query);
>
> $foo = odbc_result_all($odbc_result,"cellspacing=0 cellpadding=2
> border=1");
>
> ?>
> > -----Original Message-----
> > From: Jared Walker [SMTP:igjarjuk@tca.net]
> > Sent: Thursday, June 29, 2000 1:06 PM
> > To: Php-General
> > Subject: [PHP] ODBC Example?
> >
> > Hello,
> > Can anyone send me a simple ODBC example code? I'm planning on
> > connection
> > to an access database, with using a DSN. Can anyone help?
> >
> > -Jared "Igjarjuk" Walker
> > "Life should come with reference drivers."
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net