On 10/21/16 5:36 PM, Davis, Daniel (NIH/NLM) [C] wrote: > > So, I must run my application through a source code scanner, and it is > reasonably complaining that I am using String.format() and > stmt.executeQuery(query) with the Virtuoso JDBC connection. > > > > Yet, this is SPARQL. I see some discussion of prepared statements on > this list in the past. What I want to know is: > > · What is the best way to get this to work at all? > > · Is there any way I can bind a parameter whose value includes > a PREFIX in the query? Something like stmt.setString(1, “mesh:D20189”); > > > > Dan Davis, Systems/Applications Architect (Contractor), > > Office of Computer and Communications Systems, > > National Library of Medicine, NIH > > >
I assume your query is of the form:
SPARQL
{SPARQL-Query}
OR
SELECT {SELECT-LIST}
FROM {SPARQL {SPARQL-QUERY} } AS {SQL Tabular Relation ALIAS} .
[1] http://bit.ly/sparql-as-sql-tabular-relation -- SPARQL Query as SQL
Tabular Relation (note: user "vdb" for user and pwd) in FROM CLAUSE
[2] http://bit.ly/sparql-as-sql-tabular-relation2 -- SPARQL Query as SQL
Tabular Relation
--
Regards,
Kingsley Idehen
Founder & CEO
OpenLink Software (Home Page: http://www.openlinksw.com)
Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen
Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen
Web Identities (WebID):
Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this
:
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
