Matthew Tedder wrote:
I saw the interface on the earlier virtual machine implement I setup.. It's
very impressive.

This machine (our development environment) is headless and behind firewalls
and I normally ssh tunnel to get to it.  However, I connected to an Ubuntu
machine in the same network via remote X (ssh tunneled) and used Firefox to
connect to port 8890.

It shows my database "studies" at the same level as "DB", "PUMP", "UDDI",
"VAD", etc.

Clicking down to the tables, it shows them as:  studies.DBA.studies

I used the default DBA account (for now).  I didn't modify any defaults of
installation from the tarball, to keep things simple.

But "SELECT * FROM studies.DBA.studies;" still returns the same syntax error
as did "SELECT * FROM studies..studies;"

Under the "Interactive SQL" tab, "SELECT * FROM studies..studies;" works
fine.. So, does this mean Virtuoso is somehow seeing it differently from my
php script:

<?php

$dbc = odbc_connect('virtuoso','dba','dba');
$(!$dbc) { exit("Failed!\n"); }

$sql = "SELECT * FROM studies..studies;";
$rs = odbc_exec($dbc, $sql);
I assume you are going via PDO to Virtuoso? If so then PDO is basically making incorrect assumptions about how Virtuoso qualifies its database objects.

Have you looked at the PHP and Virtuoso guide at:

1. http://www.openlinksw.com/dataspace/dav/wiki/Main/VirtuosoPHP
2. http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/IODBCPHP
3. http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/FAQ -- search on "trace" to see how to enable call tracing, this will show you what PDO is doing and how it might be getting its calls to Virtuoso wrong.

Kingsley
Matthew


-----Original Message-----
From: Ted Thibodeau Jr [mailto:tthibod...@openlinksw.com] Sent: Friday, August 06, 2010 10:11 AM
To: Matthew Tedder
Cc: virtuoso-users@lists.sourceforge.net
Subject: Re: [Virtuoso-users] In SQL how can I reference my tables?

Hi, Matthew --


On Aug 6, 2010, at 08:42 AM, Matthew Tedder wrote:

So the PHP odbc_connect() method seems to connect, because I get SQL
errors.
Can anyone tell me how to at least select from these tables.. I created
them using isql like this:
USE studies;
CREATE TABLE studies ( ...);
But the following variations give SQL errors: USE studies; SELECT * FROM studies;
SELECT * FROM studies.studies;
SELECT * FROM studies..studies;
SELECT * FROM DB.studies;
SELECT * FROM DB.studies.studies;
To keep working, I made a mirror of these tables in MySQL and so that's
what I am working with now.  I am already past my deadline.
As a last resort I might end up setting up a PHP ARC -based SPARQL endpoint
and dumping to that, periodically from the tables.  But that won't scale and
has other limitations.
But I kinda feel not so good. I got excited reading about Virtuoso and now
everyone's looking at me.  We're looking at possibly moving a lot over to it,
including VIVO (researchers and their publications-currently using
Sesame/Jena), a huge clinical data repository, and others.
I feel so close to breaking the egg-shell that can open up a huge new world
of uses..  but also stressed with a very short timeline.


It seems that you're trying to learn a lot of new things all at once,
and that they're mixing up together and confusing each other.

Telling us that "the following variations give SQL errors" doesn't give
us much with which to debug the issue -- because we don't know whether
the errors are identical in all cases, nor even what the single error
is (unless it's a repeat of the original you reported?) ...

Do you have a Web browser? Can you use it to target the Virtuoso Conductor (the web-based Admin interface)? By default, you'll find
it somewhere like --

   http://localhost:8890/conductor/

-- or --

   http://virtuoso-host.example.com:8890/conductor/

-- with a different port, if you've changed [HTTPServer]:ServerPort (*NOT* [Parameters]:ServerPort) during installation or by manually editing the virtuoso.ini.
Log in, and drill down to the Database area.  You should be able to
see where your tables are -- and thus how to identify them in your
SQL queries.  This documentation section may help you out --

   <http://docs.openlinksw.com/virtuoso/htmlconductorbar.html>


Hope 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:tthibod...@openlinksw.com
                             //              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





------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev _______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users



--

Regards,

Kingsley Idehen President & CEO OpenLink Software Web: http://www.openlinksw.com
Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca: kidehen





Reply via email to