In this php program:

<?php
// connect to DSN MSSQL with a user and password
$connect = odbc_connect("DSNNAME", "miki", "84139") or die ("couldn't connect");
ini_set('odbc.defaultrl','65536');
odbc_exec($connect, "use SwitchCenterDB");
$result = odbc_exec($connect, 'show tables');
while(odbc_fetch_row($result)){
...
}
odbc_free_result($result);
odbc_close($connect);
?>[Mon Mar 03 11:49:59 2008] [error] [client 132.64.4.16] PHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [unixODBC][FreeTDS][SQL Server]Could not find stored procedure 'show'., SQL state 37000 in SQLExecDirect in /srv/www/htdocs/hu/Proj1/ttc.php on line ...

there is an error:

__________________________

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AaronHorne's picture

The error

On November 2nd, 2009 AaronHorne says:

$result = odbc_exec($connect, 'show tables');

This is where the error is. I don't think 'show tables' is a valid parameter here.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

December 2009, #188

If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.


Read this issue