HOW to get the bind variables list.

I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need to use DBMS_SQL in order to execute them.
In theese SQL statements I have some bind variables like :NUMORD. (ex. SELECT 'X' FROM YYYY WHERE FIELD_1 = :NUMORD).
I don't know "a priori" names and number of such variables.
Is there any way to have a list of such bind variables ?
I found DBMS_DESCRIBE but is seems to act only on stored procedures/functions.
I know I can tray to inspect the code looking for every ':' but a cleaner solution woulf be appreciated.
Tks
Tullio

I don't know "a priori" names and number of such variables.
Is there any way to have a list of such bind variables ?The names are probably not important, but you can get the count (and other useful information) like this:
SQL> var cur refcursor
SQL> declare
    cl clob;
begin
    dbms_lob.createtemporary (cl, true);
    sys.utl_xml.parsequery (user, 'select e.deptno, :x x from emp e where deptno = :deptno', cl);
    open :cur for select cl cl from dual union all
                  select 'Count binds: ' || xmlquery('count(//BIND_VARIABLE)' passing xmltype(cl) returning content).getclobval() from dual;
    dbms_lob.freetemporary (cl);
end;
PL/SQL procedure successfully completed.
SQL> print cur
CL                                                                             
<QUERY>                                                                        
  <SELECT>                                                                     
    <SELECT_LIST>                                                              
      <SELECT_LIST_ITEM>                                                       
        <COLUMN_REF>                                                           
          <SCHEMA>MICHAEL</SCHEMA>                                             
          <TABLE>EMP</TABLE>                                                   
          <TABLE_ALIAS>E</TABLE_ALIAS>                                         
          <COLUMN>DEPTNO</COLUMN>                                              
        </COLUMN_REF>                                                          
      </SELECT_LIST_ITEM>                                                      
      <SELECT_LIST_ITEM>                                                       
        <BIND_VARIABLE>1</BIND_VARIABLE>                                       
        <COLUMN_ALIAS>X</COLUMN_ALIAS>                                         
      </SELECT_LIST_ITEM>                                                      
    </SELECT_LIST>                                                             
  </SELECT>                                                                    
  <FROM>                                                                       
    <FROM_ITEM>                                                                
      <SCHEMA>MICHAEL</SCHEMA>                                                 
      <TABLE>EMP</TABLE>                                                       
      <TABLE_ALIAS>E</TABLE_ALIAS>                                             
    </FROM_ITEM>                                                               
  </FROM>                                                                      
  <WHERE>                                                                      
    <EQ>                                                                       
      <COLUMN_REF>                                                             
        <SCHEMA>MICHAEL</SCHEMA>                                               
        <TABLE>EMP</TABLE>                                                     
        <COLUMN>DEPTNO</COLUMN>                                                
      </COLUMN_REF>                                                            
      <BIND_VARIABLE>2</BIND_VARIABLE>                                         
    </EQ>                                                                      
  </WHERE>                                                                     
</QUERY>                                                                       
Count binds: 2                                                                 
2 rows selected.

Similar Messages

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • How to identify the bind variable peeking problem?

    How to identify the bind variable peeking problem whether my db hitting or not and how to resolve it?
    currently we are doing the dbms_stat of application schema's with gather auto option and i hope this option we take the histogram stats also. Is there any option to improve it and its highly transactions oltp env of 11g.

    What is your exact 4 digits Oracle version ?
    Bind peeking issues are supposed to be solved with adaptative cursor sharing in 11.1 and 11.2:
    11.1 http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/optimops.htm#sthref919.
    11.2 http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/optimops.htm#PFGRF94588
    which says also:
    >
    Adaptive cursor sharing is enabled for the database by default and cannot be disabled. Note that adaptive cursor sharing does not apply to SQL statements containing more than 14 bind variables.
    >
    Edited by: P. Forstmann on 10 nov. 2011 13:50

  • How to get the bind value of a portlet in a page.

    I want to get the bind value of a portlet on a page. Can you tell me how can I get that.
    I used :
    portal30.wwv_name_value.get_string( l_arg_names, l_arg_values, '');
    It works ok when we run the report alone .But when we add the report as a portlet in page , it does not return any value. Can you tell me which Api does it.
    null

    Here is an example...
    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
    out = out.concat(zeroPad(d2h(reqHex[No]),2));
    return out;
    function eyeDropperRGB(x,y) {
    var x2 = x + 1;
    var y2 = y + 1;
    var out = new Array(3);
    activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
    for(ch in list = ["Red", "Green", "Blue"]) {
    histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
      return out; 
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;

  • How to get the session variable value in JSF

    Hi
    This is Subbus, I'm new for JSF framewrok, i was set the session scope for my LoginBean in faces-config.xml file..
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope> like that...
    So all parameter in LoginBean are set in session right ?... for example i used userId is the Parameter...
    Now i need to get the the userId parameter from that session in my another JSP page.. how i get that ?..
    Already i tried
    session.getAtrribute("userId");
    session.getValue("userId");
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..
    By
    Subbus

    Where i use that..is it in jsp or backend bean...
    simply i use the following code in one backend bean and try to get the value from there bean in the front of jsp page...
    in LogoutBean inside
    public String getUserID()
         Object sessionAttribute = null;
         FacesContext facescontext=FacesContext.getCurrentInstance();
         ExternalContext externalcontext=facescontext.getExternalContext();
         Map sessionMap=externalcontext.getSessionMap();
         if(sessionMap != null)
         sessionAttribute = sessionMap.get("userId");
         System.out.println("Session value is...."+(String)sessionAttribute);
         return (String)sessionAttribute;
         return "fail";
    JSP Page
    <jsp:useBean id="logs" scope="session" class="logs.LogoutBean" />
    System.out.println("SS value is ...."+logs.getUserID());
    but again it retrieve only null value.. could u please tell me first how to set the session variable in JSF.. i did faces-config only.. is it correct or not..
    By
    Subbus

  • How to pass the bind variable value to the sql statement of the LOV

    Hi,
    I am using Forms 10g builder.
    I have a text item which will be populated by a LOV when i press a button, but i have a bind variable in the SQL statement of the LOV. That bind variable should be replaced by a value which is derived from a radio group in the same data block.
    For Ex: ( )radio1 ( )radio2
    before i click on the push button, I'll select one of the radio button above,so my question is how to assign this radio group value to the bind variable in the sql statement in the LOV?
    Pl any hint is appreciated!
    Thanks
    Reddy

    The variable can be taken into account in the SELECT order contained in the Record Group used by the LOV.
    e.g. Select ... From ... Where column = :block.radio_group ...Francois

  • How to set the bind variable on page load and execute query ?

    Hi All,
    I am using Jdeveloper 11.1.1.5
    I have a table called "Employee"
    Columns :- id , name , location
    Data :- 1, ,james , chicago
    2 ,Raj ,capetown
    Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
    Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
    I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
    How can i use the bind variable appropriately ??
    Please suggest !!!!
    Thanks.

    Hi,
    Check
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
    http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
    -Suresh

  • How to have the BIND variables value using the TKPROF utility.

    WE have a JAVA application and Oracle 9i database.We need to figure out what all select/update/insert sql staements are firing if i am doing one complete processing in my JAVA front application.
    Initally I have planned for using TKPROF utility after makeing AUTO_TRCE=TRUE in the database.But the problem is that all select/insert/update sql statements are using the BIND variables in the JAVA code and same is coming/printing on the trace file also.
    can we print out the BIND variables values also,while making the TRACE ON?
    eg: trace is generaitng the all insert statements like below.
    insert into TEST(Column1,Column2) values(:1,:2);
    I want to know the value of :1 and :2 bind variables.
    If you have any cluse about it please let me know.
    Mitesh Shah

    Thanks Guys,
    I got the BIND variable values in the TRACE file.Previously i was searching on the OUtputfile.
    I am pasting the same trce file format.Can you please verify it.Is i am looking the correct file and corect location.
    PARSING IN CURSOR #2 len=1571 dep=0 uid=66 oct=3 lid=66 tim=18446744071740803342 hv=1462188955 ad='123434f0'
    SELECT PARENTIDKEY,CONTRACTKEY,COMPANYKEY,BACKENDKEY,DATAREP,BANKHOLDINGID,BANKID,CARRIERPARTYID,PRODUCTID,ID,PREMIUMINDEXRATE,ILLUSTRATEDMATURITYLOW,ILLUSTRATEDMATURITYHIGH,SPECIALHANDLING,CARRIERCOMMCODE,MONEYTRANSFERTYPE,FIRSTBILLSKIPMONTH,CONTESTABILITYENDDATE,DEDUCTIONDATE,MARKETVALADJUSTIND,FREEAVAILABLEAMT,ADVANCINGREJECTEDIND,RATEDIND,OTHERINSUREDIND,ENDORSEMENTIND,BENEFICIARYIND,CASECONTROLNUMBERASSUMING,OWNERLEGALNAME,STAMPDUTY,COMMISSIONANNUALIZEDIND,NONSTDCOMMTAKEN,LAPSETAXABLEGAIN,GOVTALLOTMENTSUSPENSEACCTAMT,LASTNOGOODCHECKREASON,LASTNOGOODCHECKDATE,LASTCOIDATE,LASTDEDUCTEDEXPENSECHARGES,LASTDEDUCTEDCOICHARGES,STATEMENTBASIS,LASTNOTICETYPE,LASTNOTICEDATE,PAYMENTDUEDATE,LASTBANKCHANGEDATE,EFTENDDATE,BANKBRANCHNAME,BANKNAME,PAYMENTDRAFTDAY,BANKACCTTYPE,CREDITCARDTYPE,CREDITCARDEXPDATE,ACCTHOLDERNAME,ROUTINGNUMBER,ACCOUNTNUMBER,PAYMENTMETHOD,ANNUALPAYMENTAMT,PAYMENTAMT,PAYMENTMODE,LASTCOIANNIVDATE,BILLINGSTOPDATE,BILLEDTODATE,FINALPAYMENTDATE,GRACEPERIODENDDATE,PAIDTODATE,STATUSCHANGEDATE,REINSTATEMENTDATE,TERMDATE,ISSUEDATE,EFFDATE,DOWNLOADDATE,DURATION,POLFEE,POLICYVALUE,COMMISSIONROLLOVERPCT,COMMISSIONOPTIONSELECTED,REPLACEMENTTYPE,CUSIPNUM,CONVERTTOPRIVATEIND,PORTABILITYIND,REINSURANCEIND,BILLNUMBER,JURISDICTION,ISSUETYPE,ISSUENATION,STATUSREASON,PRIORPOLICYSTATUS,POLICYSTATUS,SHORTNAME,ADMINISTERINGCARRIERCODE,PLANNAME,FILEDFORMNUMBER,FORMNO,CARRIERCODE,PRODUCTCODE,PRODUCTTYPE,LINEOFBUSINESS,CERTIFICATENO,POLNUMBER,CARRIERADMINSYSTEM FROM "POLICY" WHERE PARENTIDKEY = :1 AND CONTRACTKEY = :2 AND COMPANYKEY = :3 AND BACKENDKEY = :4
    END OF STMT
    PARSE #2:c=0,e=1298,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=0,tim=18446744071740803336
    BINDS #2:
    bind 0: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a5a9c bln=4000 avl=09 flg=05
    value="Holding_1"
    bind 1: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a4af0 bln=4000 avl=10 flg=05
    value="DUL001138U"
    bind 2: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069bb890 bln=4000 avl=02 flg=05
    value="00"
    bind 3: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069ba8e4 bln=4000 avl=04 flg=05
    value="CLIF"
    **********************************************************************************

  • How to get the amazon book list design with the RowRepeater

    Hello,
    at the moment I am programming a small book management application. After the fight with the row repeater (that at least was a bug in the rowrepeater) I would like to have a desing like the amazon-list:
    http://www.amazon.com/s/ref=nb_ss?url=search-alias%3Dstripbooks&field-keywords=sap
    Could someone tell me how I can achive this?
    - How can I use the Image with the url to the image.
    - How can I get the title as link to a view that shows the details of the book (is it LinkToAction? if yes, how can I pass a parameter?)
    - How can I get the design with 2 cols and for the text new lines?
    Thank you very much in advance and have a nice week,
      Vanessa

    How can I use the Image with the url to the image.
    With image you cannot have URL. You have use Image UI element and you can place an linktourl element below the image.
    How can I get the title as link to a view that shows the details of the book
    For links, you are right . You have to use LinkToAction UI element. On the Action of Link , you can get the value selected by reading the attribute binded to that link.
    How can I get the design with 2 cols and for the text new lines
    For columns , you have to use Table UI element.
    For designing you view according to the requirements , you can use various UI elements :
    Tray , Group , Transparent containers. These would help you in making specific containers or grouping particular set of elements together.

  • How to get the Database Driver list

    Hi... I want to know that particular database driver is registered or not in windows.. how can i get this info.
    And I want to get the list of all the database drivers registered in windows..
    Can anybody help me..

    dcminter wrote:
    Well, seeing as how none of them are registered, until your program registers them, simply keep a list.That's not actually true. If the JAR is in the classpath then a JDBC4 driver will use the service provider hooks to register itself.
    When first loaded. Which is unlikely to happen until you explicitly load it.
    Being on the classpath doesn't mean the JVM will actually do anything with a class. Either an application will have to initiate some action or it will have to be initiated by the manifest of the jar (and I'm not sure that will actually do anything until a class from that jar is actually required to be loaded).

  • How to get the Runstate variable of an external sequence called from the Client Sequence through Sequencecall?

    Hi,
               I need to change the runtime high and lo limit values of all the tests of the client sequence file before running it. My sequence file is having a SequenceCall which calls an external sequence. Can anyone tell me how to change/access the High and lo limit values of the external sequence test steps?
    Thanks,
    Jeyan

    Doug,
              I used the property loader method but I could not load the limits of any sub sequence call calling an external sequence file.
    I took the FlowRate_test.seq example from the NI Example folder "C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2.1\Examples\PropertyLoader\LoadingLimits\LimitsFromExcelFile\UsingCVI". I created a sequence called PumpTest.seq in the same folder path. I then moved the Pump Test step from the FlowRate_test.seq to the PumpTest.seq. Now created a sequence call in the FlowRate_test.seq and called the PumpTest.Seq as the module path. When I execute the FlowRate_test.seq , I get the error as shown below:
    Attached is the Flowrate_Test.seq and the PumpTest.seq which should be there in the folder path "C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2.1\Examples\PropertyLoader\LoadingLimits\LimitsFromExcelFile\UsingCVI".
    Let me know whether I am doing something wrong in this method. 
    My idea is to alter the runstate variable High and Low of Pump Test in the PumpTest.seq and then run the Flowrate_Test.seq.
    Attachments:
    PumpTest.seq ‏6 KB
    FlowRate_test.seq ‏11 KB

  • How to get the table/tree/list cell underneath the mouse

    I feel like I must be missing something. How can I find out the tree cell underneath the mouse cursor?
    I am implementing drag and drop from a table to a tree. I need to know which tree cell the user dropped the item on. I can get the drop coordinates (in pixels, I assume) from the drag event, but there doesn't seem to be a way to convert that into the particular cell index. This same question applies to getting the list and table cell under at particular coordinates.
    If there isn't an API for this, has anyone found a reliable workaround (dividing Y by cell height, etc.)
    Thanks,
    Josh

    You need to put event handlers for the D&D events on the Cells that are being created (so you will need to set a custom cell factory). For example, every cell is a Node, and these support properties like 'onDragDroppedProperty', and 'onDragExitedProperty'.
    When you add event handlers to these, you should be notified of items being dragged onto specific Cells of the Tree. A Cell then can be matched with a particular item in the Tree by reading its TreeItem property.
    Also read the documentation for TreeItem. There is a bit there that says:
    "It is important to note however that a TreeItem is not a Node, which means that only the event types defined in TreeItem will be delivered. To listen to general events (for example mouse interactions), it is necessary to add the necessary listeners to the cells contained within the TreeView (by providing a cell factory)."
    Which gives a clear hint at the end that for other interactions, you should add listeners to the Cells.
    Good luck!

  • How to get the iChat Buddy List to automatically appear on the Desktop

    On my friends computer iChat is set to launch whenever he logs into his account, but the Buddy List does not appear on his Desktop. So when I see him online there is no green video camera mark next to his name.
    If I want to do a screen share with him, I have to ask him to go to the iChat icon towards the right side of the Menubar (the round 'speech ballon') and click on Show AIM Buddy List at the bottom. Once he has the Buddy List on his Desktop, I can screen share with him.
    Surely there must be a way for the Buddy List to always appear on the Desktop when logging into his computer... Can anyone help out?

    Hi,
    Interesting one.
    If I were telling you how to create this it would be like this:-
    1) Go to System Preferences > Accounts > Your account and enter iChat in the Login items. (Makes iChat launch at Computer Start Up)
    2) to Hide the Window (Buddy List(s) ) at Start Up click the Red Button to close the Window/Buddy List before Quitting.
    This will cause the next Start Up to not show th Buddy List.
    How you make the Buddy List appear after that depends on how you bring it in to View.
    NOTES:
    Some Windows in iChat from Buddy List to the Preferences to th Actual Chat Windows will appear in the places you left them for the most part.
    The Exceptions are Incoming Invites.
    This means the Buddy List will be were you left it, your Outgoing Invite/Preview whilst waiting for Connection will always be where the last outgoing Video Chat window was.
    Using the Red Button on a Open Chat Window will end the Chat (All types).
    However doing it to a Buddy List only Hides it.
    In addition to this using the Item (or the Keystrokes) from the Window Menu of iChat for a Buddy list when it is On view will Hide it (or Bring it back if Hidden)
    The Show AIM option in the Menu Bar icon's drop down is a two edge thing as it shows All Buddies (Available ones) from all AIM Buddy lists if you have more than one (Apple names are also AIM Names in this case).
    Does he want to change this Behaviour ?
    He would be better off using the iChat Window menu (or Keystrokes) after he has clicked the icon in the Dock to bring the app to the Front so he can access the Menu bar with ichat in it.
    He could also click and Hold the icon for iChat in the DOCK and select the Account Name there. This, if I remember correctly, will have the same effect as presenting the Buddy List from the Menu Bar icon (it will be hidden at Next Start Up)
    9:58 PM Saturday; November 13, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • How to get the Text variables in the Columns Headings

    Hi,
         My requirement is I need to get data for weekly wise and for the last 10 weeks also. For this purpose I used the restricted KF based on the variables (customer exit) and offset. Also used the text variable for displaying from and to days in the column headings. I am getting the right text for the first column only. But the text offset is not considering.
    Ex 07/04/2007 to 07/10/2007      06/27/2007 to 07/03/2007 like that.
    I used the two text variables one for from data and other for to date using the customer exit. I am getting the same text as of the first column for the subsequent columns also. Please help me for getting the right text in the columns.
    Thanks,
    visu

    Hello ,
               The quite simple way is to create a text variable with replacement path , as it replaces the value of customer exit used in the report.
    create two text variables
    First variable:
    1 Replace variable with -
    external characteristic key value
    For interval use ---from value
    2.Secod text variable
    Replace variable with -
    external characteristic key value
    For interval use ---To value
    offset start -0000 offset length0000
    use these variables in the column headings.
    hope it is clear,
    assign points if useful

  • How to get the blog site list in the sitecollection

    In this dt.rows.add(actor.contenturi) im getting all the follwing sites.but i need to get subsites list.(post is a default list in all blog list.  In this code im getting current users followed blog, (I got what are sites the user is following). I have to get the post list in this blog site collection. Tell me the approach to get the list. using System;
    using System.ComponentModel;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.Office.Server.UserProfiles;
    using Microsoft.SharePoint;
    using Microsoft.Office.Server.Social;
    using System.Data;
    using System.Web.UI.WebControls;
    namespace VisualWebPartProject1.VisualWebPart1
    [ToolboxItemAttribute(false)]
    public partial class VisualWebPart1 : WebPart
    // Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
    // the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
    // for production. Because the SecurityPermission attribute bypasses the security check for callers of
    // your constructor, it's not recommended for production purposes.
    // [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
    public VisualWebPart1()
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    InitializeControl();
    DataTable dt = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    using (SPSite spSite = new SPSite("/sites/testBlog"))
    using (SPWeb spWeb = spSite.OpenWeb())
    dt.Columns.Add("URl",typeof(string));
    SPUser currentuser = spWeb.CurrentUser;
    SPServiceContext context = SPServiceContext.GetContext(spSite);
    UserProfileManager upm = new UserProfileManager(context);
    UserProfile profile = upm.GetUserProfile(currentuser.LoginName);
    SPSocialFollowingManager followmanager = new SPSocialFollowingManager(profile);
    followedsites = followmanager.GetFollowed(SPSocialActorTypes.Sites);
    foreach (SPSocialActor actor in followedsites)
    dt.Rows.Add(actor.ContentUri);
    GridView1.DataSource = dt;
    GridView1.DataBind();
    Controls.Add(GridView1);
    public SPSocialActor[] follwedsites { get; set; }
    public SPSocialActor[] followedsites { get; set; }
    }

    Hi,
    According to your description, you want to get the post list in the blog site collection.
    It could be achieved using SPList Object. You can get the list by the list title or list URL. The default name of post list is “Posts”.
    Here is a code snippet for your reference:
                using (SPSite site=new SPSite("your site url"))
                    SPWeb web = site.OpenWeb();
                    SPList list = web.Lists.TryGetList("Posts");
                    Console.WriteLine(list.Items.Count);
    Refer:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getlist.aspx
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for