[Tue Mar 04 14:10:00 2008] [error] [client 132.64.4.16] PHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [unixODBC][FreeTDS][SQL Server]Invalid object name 'DeviceView'., SQL state S0002 in SQLExecDirect in /srv/www/htdocs/hu/Proj1/ttb.php on line 7
[Tue Mar 04 14:10:00 2008] [error] [client 132.64.4.16] PHP Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in /srv/www/htdocs/hu/Proj1/ttb.php on line 8
[Tue Mar 04 14:10:00 2008] [error] [client 132.64.4.16] PHP Warning: odbc_free_result(): supplied argument is not a valid ODBC result resource in /srv/www/htdocs/hu/Proj1/ttb.php on line 12
Source:
-- begin odbctest.php---
<?
// connect to DSN MSSQL with a user and password
$connect = odbc_connect("DSNNAME", "miki", "84139") or die ("couldn't connect");
odbc_exec($connect, "use SwitchCenterDB");
//$result = odbc_exec($connect, "SELECT * FROM DeviceView");
$result = odbc_exec($connect, "SELECT address, portalias FROM DeviceView");
while(odbc_fetch_row($result)){
print(odbc_result($result, "address") .
' ' . odbc_result($result, "portalias") . "\n");
}
odbc_free_result($result);
odbc_close($connect);
?>
--- end odbctest.php --
__________________________
Subscribe now!
Recently Popular
| Building a Call Center with LTSP and Soft Phones | Aug-25-05 |
| Time to school the FCC on what "free" really means | Jul-02-08 |
| An Open Video to HP | Jul-02-08 |
| Boot with GRUB | May-01-01 |
| Chapter 16: Ubuntu and Your iPod | Aug-30-06 |
| Data Manipulation with Sprog | Jul-03-08 |
Featured Video
From the Magazine
July 2008, #171
Heard of the Web? If not, read on. This month we talk with Matt Mullenweg about WordPress. If you want to get your hands dirty in Web code, take a look at the rest of our feature articles on WebKit, Dojo and OpenLaszlo.
In the rest of the issue, you'll find articles on OpenID, RDFa and Quanta Plus.
Kyle Rankin puts a new spin (as in "no" spin SSD) on hard drives and
also tells you how to migrate to that new disk (spinning or not).
Mick Bauer continues his series on customizing live CD's.
And, James Gray gives us a feel for the state of Linux in the enterprise.
After all that, you may need some TV time. If so, check out our review
on how to make that digital TV tuner card work in your Linux box.
Delicious
Digg
Reddit
Newsvine
Technorati





