Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2006, 04:06 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to EDCH123
Default How to return a string to it's exact original (len

Subject : .


Dear sir :

    I have built a list which get populated based on a query from an access data source , I try

to use the string retrived from this list in the where condition of another - dynamic - qury ,

but my code didnt work please help me

  A string St1 is passed to Jlist , when item of this list get selected an event lunch another qury based

 on this St1 but this didnot work .





The list was implimented in this way :

    List sampleJList ;

 then was populated using the following qury :

ClientsNamesRetrival = " SELECT CLIENT_NAME AS CN FROM CLIENTS ";

entries[mm++] = TheResultSet.getString("CN");

sampleJList = new JList(aaa.entries);

Then when I select an Item to the following code should perform a qury based on the sellection result

but this code having problem :

    if (!event.getValueIsAdjusting())

{ valueField.setText( (SelectedClient = sampleJList.getSelectedValue().toString()));






try
                {

ClientsNamesRetrival = " SELECT TRIM( INCHARGE_PERSON ) AS IC FROM CLIENT_PERSONS "
                      + " WHERE CLIENT_NAME Like ' CStr(SelectedClient) *'" ;





Similar Threads
Thread Thread Starter Forum Replies Last Post
STRING EXACT MATCH ricespn Beginning VB 6 6 November 12th, 2007 01:18 PM
Original form SaveAs new doc w/o original VBA ChuckTremain Word VBA 0 February 8th, 2007 02:58 PM
return to exact location like the 'back' button dhaywirex Classic ASP Basics 4 February 21st, 2004 02:08 AM
Return String is Different kochoo Classic ASP Components 2 October 19th, 2003 05:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.