Article View: borland.public.jbuilder.database
Article #384Re: JBuilders SQL Builder, using functions?!?!?!?
From: Lori M Olson [TeamB]
Date: Mon, 19 Feb 2007 23:04
Date: Mon, 19 Feb 2007 23:04
79 lines
3938 bytes
3938 bytes
N wrote:
> "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
>
>
Ok, that's the relevent information we needed. classes12.jar is very
old, and was intended for JDK 1.3 and earlier. You need a more recent
JDBC driver jar.
According to the Oracle FAQ, you can use the ojdbc14.jar file from
Oracle 10 with Oracle 8.1.7.
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<45da2ccf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45d62c8a$1@newsgroups.borland.com> <45d9f211$1@newsgroups.borland.com> <45da1797$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 Date: Mon, 19 Feb 2007 16:04:20 -0700 From: "Lori M Olson [TeamB]" <javadragon@techie.com> User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.database Subject: Re: JBuilders SQL Builder, using functions?!?!?!? References: <45d62c8a$1@newsgroups.borland.com> <45d9f211$1@newsgroups.borland.com> <45da1797$1@newsgroups.borland.com> In-Reply-To: <45da1797$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.182.172 Message-ID: <45da2ccf$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171926223 142.179.182.172 (19 Feb 2007 15:03:43 -0800) Lines: 79 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail