• 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
Re: libpq prepared statement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libpq prepared statement


  • Subject: Re: libpq prepared statement
  • From: Keary Suska <email@hidden>
  • Date: Mon, 31 Mar 2008 14:24:58 -0600
  • Thread-topic: libpq prepared statement

on 3/31/08 1:44 PM, email@hidden purportedly said:

> PQprepare *statement = PQPrepare(theConnection, "stmtname", "SELECT *
> FROM admin WHERE id = %s", 1, [theUUID]);

Yes--it not even close. The libpq prototype is:

PGresult *PQprepare(PGconn *conn,
const char *stmtName,
const char *query,
int nParams,
const Oid *paramTypes);

It also looks like you are confusing regular C with Objective-C
(syntactically). Libpq is a C library, so constructs such as PGresult are
pointers, *not* objects. If you don't know C very well, you really should
brush up on it. It will also help your Cocoa, since Objective-C is a
superset of C.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >libpq prepared statement (From: Justin Giboney <email@hidden>)

  • Prev by Date: Re: Main Thread UI and Detached Thread
  • Next by Date: Re: outlineViewSelectionDidChange not called
  • Previous by thread: Re: libpq prepared statement
  • Next by thread: Re: libpq prepared statement
  • Index(es):
    • Date
    • Thread