• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binary primary keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binary primary keys


  • Subject: Binary primary keys
  • From: Jeff Dunnett <email@hidden>
  • Date: Wed, 25 Nov 2009 16:27:21 -0500

Hello,

All of the Entities in our model use primary keys that have an external data type of binary with a width of 24.  I have to use some raw SQL to write some queries...One of those raw SQL queries fetches the primary key of a row. I then need to use that primary key to form the basis of another raw SQL query.  I save that primary key into a NSData object.  The problem is I can't seem to convert that object into a format that is can be used in another query.  When I try to print the information out it doesn't look right to the eye.  Anyone have anything idea's on how I might do this?

i.e 

        String sqlString = "SELECT contest_id FROM \"cms\".\"ms_contest\" WHERE contest_event = '" + contest.contestEvent() +"'";

    

        NSArray result = EOUtilities.rawRowsForSQL(ec, "cms", sqlString);

        

        NSDictionary dict = (NSDictionary)result.objectAtIndex(0);

        

        NSData data = "">"CONTEST_ID");

        

        logger.debug("Contest ID: " + data);


Regardds,
Jeff
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Binary primary keys
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: State of Windows deployment in 2009?
  • Next by Date: Re: State of Windows deployment in 2009?
  • Previous by thread: WOWODC 2010 : looking for more presenters
  • Next by thread: Re: Binary primary keys
  • Index(es):
    • Date
    • Thread