Article View: borland.public.jbuilder.database
Article #383Re: JBuilders SQL Builder, using functions?!?!?!?
From: N
Date: Mon, 19 Feb 2007 21:33
Date: Mon, 19 Feb 2007 21:33
49 lines
2816 bytes
2816 bytes
"John Moore (TeamB)" <jbm@microps.com> wrote:
>Oh, and as an additional note..
>
>If the driver supports it.. there is a DataSource property "user"..
>Consult any JDBC 2.0 book on Datasource properties..
>
>John..
>
>--
>=============================================
>TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
>Post all questions and replies to this newsgroup ONLY
>For papers on DataExpress, Applets, JSP, and Web Development go to:
>http://www.microps.com/mps/paperFAQ.html
>====================================================
I have determined that the issue is the nested querys,
ex:
Select USERNAME
FROM USER_TABLE
WHERE USERNAME = (SELECT SYS_CONTEXT('USERENV','CURRENT_USER' FROM DUAL)
Using JBuilders SQL Builder, I am simply typing in the query that I wish to use in the SQL Tab and then trying to test it by clicking the TEST Tab, at which point the following "ALERT" pops up:
"Error parsing SQL: [line 4, col44] Invalid start of expression, found near SELECT. You must enter valid SQL in order to proceed."
Is this alert being returned from the server, or is this before it even leaves JBuilder?
I know that my SQL is valid:
SELECT PS_PROJECT_INFO.PROJECT_ID, PS_PROJECT_INFO.PROJECT_NAME,
PS_PROJECT_INFO.PROJECT_DESC
FROM PS_PROJECT_INFO
WHERE PS_PROJECT_INFO.PROJECT_ID = (SELECT ORADBA.PS_PROJECT_EMPLOYEES.PROJECT_ID
FROM ORADBA.PS_PROJECT_EMPLOYEES
WHERE ORADBA.PS_PROJECT_EMPLOYEES.EMPLOYEE_ID = 8)
I just wanted to give more specifics to help me in my search for a solution. How does JBuilder determine if its valid SQL, does it use the JDBC driver? I didn't find anything relevant in the Oracle forums, so I figured I would give the exact error message that came up.
I am using JBuilder 2006 Enterprise 12.0.203.0
JDBC Driver Classes12.jar
Oracle 8.1.7
SDK 1.5
thanks for any info,
N
Technical Details
Message-ID:
<45da1797$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45d62c8a$1@newsgroups.borland.com> <45d9f211$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,9a57ca76b54fe400 X-Google-Attributes: gid1073da,public X-Google-Language: ENGLISH,ASCII-7-bit From: "N" <nmperez@water.ca.gov> Sender: "N" <nmperez@water.ca.gov> Reply-To: "N" <nmperez@water.ca.gov> Subject: Re: JBuilders SQL Builder, using functions?!?!?!? Newsgroups: borland.public.jbuilder.database X-User-Info: 136.200.198.98 References: <45d62c8a$1@newsgroups.borland.com> <45d9f211$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <45da1797$1@newsgroups.borland.com> Date: 19 Feb 2007 13:33:11 -0800 X-Trace: newsgroups.borland.com 1171920791 207.105.83.66 (19 Feb 2007 13:33:11 -0800) Lines: 51 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail