Hi, Matthew --
On Aug 5, 2010, at 11:10 AM, Matthew Tedder wrote:
> Here's my PHP code:
>
>
> <?php
>
> $dbc = odbc_connect('virtuoso','dba','dba');
> if(!$dbc) { exit("Failed!"); }
>
> odbc_exec($dbc,"USE studies;");
This suggests that you have create a catalog, studies..
(parallel to the default catalog, DB..).
> $sql = "SELECT * FROM studies;";
> $rs=odbc_exec($dbc,$sql);
Because of your USE statement above, this is implicitly --
SELECT * FROM studies..studies
-- which may clarify the errors which follow.
> And here's the errors:
>
> Warning: odbc_exec(): SQL error: [unixODBC][OpenLink][Virtuoso iODBC
> Driver][Virtuoso Server]SQ074: Line 1: syntax error, SQL state 37000 in
> SQLExecDirect in /var/www/studies/test.php on line 6
>
> Warning: odbc_exec(): SQL error: [unixODBC][OpenLink][Virtuoso iODBC
> Driver][Virtuoso Server]SQ074: Line 1: No table studies in * reference at ';'
> before ';', SQL state S0002 in SQLExecDirect in /var/www/studies/test.php on
> line 9
Hopefully that helps?
Ted
--
A: Yes. http://www.guckes.net/faq/attribution.html
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
Ted Thibodeau, Jr. // voice +1-781-273-0900 x32
Evangelism & Support // mailto:[email protected]
// http://twitter.com/TallTed
OpenLink Software, Inc. // http://www.openlinksw.com/
10 Burlington Mall Road, Suite 265, Burlington MA 01803
http://www.openlinksw.com/weblogs/uda/
OpenLink Blogs http://www.openlinksw.com/weblogs/virtuoso/
http://www.openlinksw.com/blog/~kidehen/
Universal Data Access and Virtual Database Technology Providers