Trouble escaping quotes so I can use arraylist values to get recordsets

My app is being built in tiny little baby steps.....
Thanks to the kind folks on this forum, I've modified the constructor for a class I have to accept an arrayList rather than series of strings. The relevant parts of the class are below.
Now, when I construct this class, instead of sending something like
chsShape(arraylistValue1,arraylistValue2,arraylistValue3...)
I need to construct it with infor pulled from a database. I previously had stuff hardcoded like the following, and it worked: chsShape(rs.getString("arraylistValue1"),rs.getString("arraylistValue2"),rs.getString("arraylistValue3...)")
You can see in the code below that I'm trying to escape the quotes so that they can be interpreted correctly to get info from the db. The result is that the quotes are not escaped, and my output has values like rs.getString(\"arraylistValue1\")
So once again, I am forced to turn to you ever-helpful folks.
public class chsShape {
     public ArrayList setInfo;
     public ArrayList getInfo() {
          ArrayList fields=new ArrayList();
           for (int x=0;x<setInfo.size();x++){
               fields.add("rs.getString(\\\""+setInfo.get(x)+")\\\"");     
          return ((ArrayList)fields);
}

McMahonM wrote:
I was just indicating that I hadn't heard of (or thought of) a constructor taking a resultset.
Did my previous post outlining valid content for my chsShape construction help you understand what I'm trying to do any better?
I'm happy to elaborate on anything else you might need to know.
Thanks so much for helping!Yes, I understand now. I suggest doing either of the following:
Either pass it values:
new ChsShape("Vancouver","Map 1", "2,250,000,000","Starbucks") //classes should always start with a capital letter, BTWThose values wouldn't be hard coded, so that will actually look like:
String city = ...
String somethingElse = ...
String population = ... //why is population a String?
String store = ...
ChsShape shape = new ChsShape(city, somethingElse, population, store);If there is some reason you want to pass it a list (I don't see the reason, myself):
String city = ...
String somethingElse = ...
String population = ... //why is population a String?
String store = ...
List<String> list = new ArrayList<String>();
list.add(city);
list.add(somethingElse);
list.add(population);
list.add(store);
ChsShape shape = new ChsShape(list);

Similar Messages

  • Hi everyone, Im trying to figure out how I can unlock my iphone 4s. I purchased it in Japan under AU KDDI and i finished my contract, im having trouble unlocking it so I can use it in India. Any suggestions?

    Hi everyone, Im trying to figure out how I can unlock my iphone 4s. I purchased it in Japan under AU KDDI and i finished my contract, im having trouble unlocking it so I can use it in India. Any suggestions?

    Only the carrier to which it is locked can do it.  Contact them.
    Please don't use that font.  It makes your post difficult to read and people are less likely to take time to read it and help you.

  • Is there anyway i can use my ipod to get apps without having to make a itunes, if not my ipod is pointless an mess well take it back, casue i cant put in any cedit card id stuff

    Is there anyway i can use my ipod to get apps without having to make a itunes, if not my ipod is pointless an mess well take it back, casue i cant put in any cedit card id stuff

    Why can you not " put in any cedit card id stuff"?
    You have to have an itunes account to use itunes.
    Perhaps if you explained the issue, someone could help.

  • Can anyone help me figure out if i can use my droid to get online with lapdown ?

    I am having a very hard time with a certain problem. i am trying to cut cost at home and would like to get rid of my internet service with cable co. i am under the impression that i can use my droid to connect laptop to use online. can anyone please help me step by step with this if it is possible? please email me... thanks, kathryn

    what do you think of this...
    The FCC orders Verizon Wireless to pay
    $1.25 million as settlement to the Treasury. This is just a parcel of the
    carrier’s $6.9 billion
    revenue
    it has gained from the mobile market in the second quarter of this year. The
    company is also ordered to notify Google that the objection to the tethering
    apps from the Play Store is now off. This means that when new tethering apps
    become available in the app store, everyone would be able to download and use
    them without additional fees even if they are Verizon
    customers.
    Verizon will, of course, continue to
    charge its customers with their overall data use every month so for those who
    have capped data will not be able to enjoy tethering functionality but the ones
    with unlimited data plans are the luckiest. The FCC’s ruling made everybody a
    winner; consumers under the network would be able to share their connection, app
    developers don’t fear of being blocked when releasing tethering apps, and
    Verizon can attract more customers to subscribe to their unlimited
    plan.
    Read more at http://thedroidguy.com/2012/08/fcc-mandates-verizon-to-allow-tethering-apps-on-android-smartphones/#4ea8gkhCZMf0ypQ5.99

  • Suggest Free Tools & Technologies that I can use as value additions to company

    I found this as an alternative for Microsoft Office Communicator..
    http://www.officesip.com/messenger.html
    

    Hi,
    I have got lot of answers to "What are the best advices for an Starting IT Manager". 
    Could you all please help me to identify all the Free Tools & Technologies that I can suggest & impliment to my new company as value additions.
    Eg:Help Desk SoftwaresVoIP ToolsIT PoliciesDocument Sharing tools Etc....& all other valuble things come free.
    Thank you,
    This topic first appeared in the Spiceworks Community

  • How To Display Bi-Weekly Quota Accruals Other Than Using PT50?

    Is there a t-code or report within SAP that will allow me to see how much Absence Quota is generated each pay period for an employee?  I know I can see this information when I access PT50. However, I would like to know if I can display how much vacation and sick / illness time per pay period an employee(s) generates.
    When I run time eval and an employee's quota buckets are updated, where can I view the information other than going to PT50?
    Thanks,

    If it is HR user try PT_BAL00 but rememberu2026the period on the report would be months because you would have mostly used monthly period parameter for time calendar. Say for example if you run the report for the month you wonu2019t be able to identify which sick/vac time belongs to which pay period. So you have to run the report with pay period dates to get right out put - one period at a time.
    If it is payroll user or employee, then try to use below recommendation:
    >Create two wagetypes Vac time earned and Sick time earned
    >In time eval whenever the vac and sick time is calculated, during update of Quota, please generate these 2 wagetypes based   the quota type. you can use ADDZL.
    >In payroll read these wagetypes from ZL and store it. So your reporting would be from RT not time cluster.
    >This will help you to use payroll reports to pull out data based on pay periods. I strongly recommend this because user would be comfortable using wagetype reports and it would be easy for reporting. Even you can display these wagetypes in paystub
    Edited by: Amosha on Nov 16, 2010 11:24 AM

  • Can I use a G4 to get raw video footage to a no-firewire aluminum MacBook?

    Hi -
    I recently purchased a new aluminum MacBook 2.4Ghz and was shocked to discover the lack of a firewire port. Ok, I should have read the specs more closely before ordering, but I never would have imagined this port being removed (other than from the specialized MacBook Air). As others on this board have said, what were they thinking?!
    So I have some questions about downloading raw video footage from a firewire camcorder (forgive any ignorance on my part, I'm new to camcorders and digital movie editing--I've never used iMovie). My goal is basically editing home movies.
    I have an old G4 tower (1.5Ghz, 1GB RAM). I also have an external firewire/USB drive. The tower will not run iMovie '08 because the processor is too slow. The iLife 08 disc refuses to even load iMovie on this machine.
    I haven't purchased a camcorder yet. I spent a lot of time researching affordable camcorders and had settled on a well-reviewed Canon miniDV, which of course, is firewire. This camera does not come with any software.
    Would it work to connect the camera to my G4 via firewire, download the raw footage to my external drive connected to the G4, then move the external drive over to the MacBook, connect it to the MacBook via USB, then import the raw footage to iMovie for editing? I realize the copying over USB would be very slow. I assume I need some type of software for downloading the raw footage to the G4. Since iMovie won't run and the camera has no software, is there some type of utility or shareware that lets you capture raw footage?
    Is there a better way I can use my G4 to get raw footage from a firewire camera, and then on to my MacBook? Or will this work at all?
    I see that there are a few USB camcorders out there, but they seem to be expensive or don't receive very good reviews, so I'd like to go with the firewire Canon.
    Thanks very much for the help with this frustrating issue

    Well, never mind. I'm returning the MacBook and buying a previous generation MacBook Pro, which ends up being about $200 more.
    Solves my problem, but many folks can't afford the Pro. I'll be commenting at Apple customer feedback about the lack of firewire on the new MacBook.
    Thanks for reading the post.

  • When I close my laptop lid and it goes to sleep so that I can use an external monitor, monitor does not turn on when I hit a key to start laptop

    When I use my external monitor, I cannot get it to work after awakening my laptop using any key.  My monitor won't light up although laptop keyboard is backlit showing that it has come out of sleep mode.  Why does the monitor not get the signal from the laptop?

    I still cannot figure out why it doesn't always work.  All parameters were met and my bluetooth keyboard is set correctly to wake the computer.  My keyboard becomes backlit, but my LG monitor does not pick up a video signal and is black and my laptop monitor is off.  The only way I can get out is to hold on button on laptop until it shuts down and I can start up again.  This happens on an intermittent basis.  Sometimes it works and other times I get black screens.   I need to know if I can use command F1 to get the laptop to detect the display or is their another key combination to send the signal to the external monitor when I can't see anything because I hate to do a hard shut down to get out of this mode!  Please advise!

  • How to set variables that queries can use?(10g)

    I am using only ONE TABLE here for all queries. I have one query which pulls out a key and seven other queries that create seven different report sections based on that key. All queries access data in the same table.
    The first query ahould set a key so the other seven can use that key to get data. The key changes everytime all seven queries get executed and a report page is displayed, then the queries use the new key until all keys generated by the first query are used.
    Questions?
    How do I get the seven queries to check that key. Can you have (declare) variables in Reports Builder that you can assign a value in every iteration and then include a check (for that value)in a where clause of other queries? If yes how would I do that?
    In a programming language this is simple, you pass the same value as a parameter to several functions... Can you do something similar here and set a value that all queries can check against? Like a local or global variable.
    Thanks
    Mike

    Sorry, I guess there were a few typos in my last post!
    OK. All data is pulled from the same table. Here is how the report should look:
    KEY (a number)
    Data from query 1 that belongs to key above
    more Data from query 1 that belongs to key above
    more Data from query 1 that belongs to key above
    Data from query 2 that belongs to key above
    more Data from query 2 that belongs to key above
    more Data from query 2 that belongs to key above
    Data from query 3 that belongs to key above
    Data from query 4 that belongs to key above
    Data from query 5 that belongs to key above
    Data from query 6, same
    Data from query 7, same
    END OF PAGE 1
    (there is a maximum 45 possible data lines so data will not exceed the length of a page)
    Next Page:
    KEY (a different number)
    Data from query 1 that belongs to key above
    more Data from query 1 same
    more Data from query 1 same
    Data from query 2 same
    more Data from query 2...
    more Data from query 2....
    Data from query 3 same
    Data from query 4...
    Data from query 5.....
    Data from query 6....
    Data from query 7....
    END OF PAGE 2
    Other pages all look the same. Data from each query is based on the key on the first line and so on.
    Example:
    select ipseries from ipTable (possibly for query 1)
    select ipSeries,sum(ipvalue1+ipValue2+ipvalue3) from ipTable (query1) group by....
    select (sum(ipvalue1+ipValue2+ipvalue3)/3) from ipTable (query2)
    select (sum(ipvalue1*ipValue2*ipvalue3)) from ipTable (query3)
    and so on. Each query puills a set of values or sums a set of values.... etc.
    (please note that what I have not included is that somehow we need to relate each query with the key)
    Thanks a lot

  • Can I use MD5 value for indexing files ?

    I would like to know if MD5 value for each unqiue file is also unique. I am wonder if U can use MD5 value of a file for indexing. Any suggestion ??

    I would like to know if MD5 value for each unqiue file
    is also unique.No, since the number of MD5 hashes is less than the number of possible files. Of course, if you don't have many files the probability of clashes is pretty low. There's some theory about this which you'll find in algorithms textbooks where they talk about hash tables.
    I am wonder if U can use MD5 value of
    a file for indexing. Any suggestion ??Why? Don't you want your index to tell you something about the contents of the file?

  • Does enyone know a perofesional touch screen monitor that i can use for my apple laptop???Thanks. monitor that

    Does enyone know a perofesional touch screen monitor that i can use for my apple laptop???Thanks. monitor that

    I still cannot figure out why it doesn't always work.  All parameters were met and my bluetooth keyboard is set correctly to wake the computer.  My keyboard becomes backlit, but my LG monitor does not pick up a video signal and is black and my laptop monitor is off.  The only way I can get out is to hold on button on laptop until it shuts down and I can start up again.  This happens on an intermittent basis.  Sometimes it works and other times I get black screens.   I need to know if I can use command F1 to get the laptop to detect the display or is their another key combination to send the signal to the external monitor when I can't see anything because I hate to do a hard shut down to get out of this mode!  Please advise!

  • Using item values in the query

    Hi,
    Is there a way I can use item values in the query...?
    as an example, something like this
    select a.*, :P20_CUST_NAME as CUSTOMER_NAME
    from
    table TEMP a;
    haven't tried it yet but want to get the feedback first before making an attempt...
    Thanks

    Yes, as long as that item has a value in session state..
    Thank you,
    Tony Miller
    Webster, TX

  • HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak

    Hi
    I have a new powerbook and want to give my girlfriend my old G4 power book, she has a new iphone 5s, and wants to create a new itunes/apple id. When i try to de authorize the G4 and sign in with her new apple ID it says bad password, how can i release the G4 from my cluster of authorized apples and make her the owner so she can download music and more importantly sync her music with her phone, she only has 3 songs on her iphone, and loaded all her CD's into the g4 but cant sync, im no dummy and this shouldnt be hard, but its driving me crazy!!!!!!
    thx u so much for your time heeeellppppp.

    Perhaps, as we have the same music tastes, for now i should just authorize her phone to my power book just to sync music, not pics, contacts etc? I'd hate to overright her contacts etc lol????
    HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak 

  • I am trying to share calendars with my husband (using Google calendars). He can see my calendars, but I am having trouble seeing his. We both use iPhones.

    I am trying to share calendars with my husband (using Google calendars). He can see my calendars, but I am having trouble seeing his. We both use iPhones. We both have company email addresses. I have had to install and uninstall my gmail info on my iPhone multiple times due to errors sending and receiving emails from my company email address on my phone. For some reason, all of my emails are getting stuck in my outbox when my gmail account is installed on my phone. When I delete it, my emails get sent automatically. This is really annoying! I would do without the gmail account, but I need to share calendars with my husband. How do I fix this?

    If you have two-step verification turned on in your email account, you'll have to log in with a browser and turn it off.

  • Im having trouble changing my security questions, they are from years ago so i do not remember them and the reset email is no longer active,and i dont know how i can use the account because i added money to it but it asks for the questions. anybody help??

    im having trouble changing my security questions, they are from years ago so i do not remember them and the reset email is no longer active.., and i dont know how i can use the account because i added money to it but it asks for the questions. anybody help??
    this says it all..

    Welcome to the Apple Community.
    Contact Apple through iTunes Store Support, and explain that you have forgotten your 3 security questions, that you can reset your password, but doing so doesn't reset your security questions.
    Remember, support will receive hundreds, if not thousands of requests per day, some from people trying it on, others with little explanation and others that are written extremely poorly. Take the time to explain your situation properly, be precise and concise, brief but comprehensive.

Maybe you are looking for

  • Clip Notes - can't print comments

    I'm creating Clip Notes from Premiere Pro CS4 so I can create time-stamped notes on my videos. Clip Notes is working fine in general, but when I try to print the comments, that feature is blocked in the PDF file. On the top right of the commenting pa

  • How do I keep iTuunes from splitting up 1 album into multiple albums

    I have a number of albums where the main artist is perfroming with other muscians listed with the title of the song.  When I import these albums into iTunes, it takes one album and splits it up into 10-12 different albums; 1 album for each song.  How

  • Transport issue with SLD

    Hi, On PI 7.1 EHP 1. Trying to transport an interface to Production, Prod has its own SLD. When the Basis team import the change on the Integration Builder it is failing and giving error: Communication Component | SEDCLNT316: Obligatory transport tar

  • Configure Web Service finished with error

    Hi, I had configured the web server for version EPM 11.1.2.3 on Server 2008 R2. But I had a failed status. I copied the c:\program files\Oracle\Inventory\logs\Install 2014-01-14-05:00:00PM.log file as below; What is the problem? Did you take this fai

  • Language after update

    Hello, I bought a Nokia N95 by internet, and I turned it into French language that I understand better than English. The problem is that after updatind the phone's software French language is not available anymore, it's not in the list. How can I do