From: Angel P. <an...@pc...> - 2004-02-10 18:18:14
|
query parameters (eg. "$$0$$", "$$1$$") get set by the "Params" attribute. In your case : gseqDescrQ.Params=intP where "intP" is defined later in the file as : intP.class=IntParam intP.Prompt=Integer You must define two parameters for "$$0$$" and $$1$$ in your query. gseqDescrQ.SQL=select *\ from dots.ExternalNASequence\ where external_database_release_id = $$0$$ \ and source_id = $$1$$ you can keep "intP" for $$0$$, since this is an integer, but source_id is a string, hence you must use a StringParam change "gseqDescrQ.Params=intP" to "gseqDescrQ.Params=intP,stringP" since "stringP" is already defined in this config file as: stringP.class=StringParam stringP.Prompt=Enter a string: stringP.Description=String Angel MICHAEL LUCHTAN wrote: >Just a quick question, in case anyone knows. Elsewise I'll still be >digging around: > >In the WDK-classic installation, you supply a configuration file which >specifies which pages you want to serve up, and certain paramaters, like >the sql statement that is used. I've changed some stuff for >GenomicSequencePage to make it more applicable to CTEGD web apps, and >altered following in the supplied config file: > >gseqDescrQ.SQL=select ena.source_id, ena.name, ena.description, ed.name >dbname, \ > tn.name, ena.length \ > from dots.ExternalNASequence ena, sres.TaxonName tn, >sres.ExternalDatabase ed, \ > sres.ExternalDatabaseRelease edr \ > where ena.na_sequence_id = $$0$$ \ > and ena.taxon_id = tn.taxon_id \ > and tn.name_class = 'scientific name' \ > and ena.external_database_release_id = edr.external_database_release_id \ > and edr.external_database_id = ed.external_database_id \ > and edr.external_database_release_id not in (@PRIVATE_SEQ_DB_IDS@) > >to: > >gseqDescrQ.SQL=select *\ > from dots.ExternalNASequence\ > where external_database_release_id = $$0$$ \ > and source_id = $$1$$ > >I know that this gets set, but for some reason the number of parameters >does not change. Is this hard coded somewhere? In my error >file(CATALINA.OUT) I get the following: > >Running query: >select * from dots.ExternalNASequence where external_database_release_id >= 35 and source_id = $$1$$ >java.sql.SQLException: ORA-00911: invalid character > >But I know that I am passing an array with two elements in it, and it is >obviously getting the first one. > > >If any knows why it won't insert the second parameter, please let me know. > > >Michael Luchtan >http://www.cs.uga.edu/~luchtan > > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |