Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 12th, 2005, 09:22 AM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Syntax for bind variables in Pro*C

Hi,

I need to use bind variables in Pro*C. How do I use it? looking for syntax. PLEASE HELP. It's URGENT. Expert one-on-one doesn't talk about this.

Below is the cut-paste from TKPROF -:

update temp_table set PROCESSED_BY_LOAD='Y',
 country_determine_logic=:b0,date_modify=:b1
where
 rowid=CHARTOROWID(:b2)


call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 918 0.22 0.65 0 0 0 0
Execute 918 0.97 1.08 0 1395 9406 918
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 1836 1.19 1.73 0 1395 9406 918

Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 36 (RHEARAK)

Rows Row Source Operation
------- ---------------------------------------------------
 1 UPDATE
 1 TABLE ACCESS BY USER ROWID TEMP_TABLE


Rows Execution Plan
------- ---------------------------------------------------
 0 UPDATE STATEMENT GOAL: CHOOSE
 1 UPDATE OF 'TEMP_TABLE'
 1 TABLE ACCESS GOAL: ANALYZED (BY USER ROWID) OF 'TEMP_TABLE'

Please see that the parse count and execute count are the same .
So I thought of using bind variables. But I have not worked much on bind variables.

So am confused with the syntax. I tried few options but it's not working.
================================================== ==================
EXEC SQL
 UPDATE temp_table
 SET PROCESSED_BY_LOAD ='Y',
 country_determine_logic=:s_country_determine_logic ,
 date_modify=:s_sytem_date
 WHERE
 rowid = CHARTOROWID(: s_row_id);
================================================== ==================
s_country_determine_logic etc, are host variables.

As far as I know all host/indicator variables are bind variables. Please correct me if I am wrong and let me know the syntax.


Thanks in Advance,
Rhea

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Bind Two Variables to LinkButton Control cyberstore05 .NET Framework 2.0 1 October 31st, 2008 02:50 AM
Bind a Label cp75 ASP.NET 1.0 and 1.1 Basics 19 January 10th, 2007 10:53 AM
Grid Bind msbsam ASP.NET 2.0 Basics 1 December 19th, 2006 07:03 AM
Transferring Macro Variables Values To Another Pro sword_him Excel VBA 0 September 29th, 2006 08:42 AM
Syntax for Populating Variables rit01 ASP.NET 2.0 Professional 0 July 10th, 2006 04:28 AM



All times are GMT -4. The time now is 08:47 AM.


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