Using SQL in VC++ with ADO ( in Oracle9i)

Hi ! i am a newcomer .
Are there any document about this ?
I want manipulate the Oracle databse with SQL statements
in VC++6.0 , there are LOB fields
I use ADODB
With VB6.0 is OK but in VC++ i don't know whatto do
Thaks all
email : [email protected]

If you have a support contract, there is a fair amount of C++ ADO sample code available on Metalink. Otherwise, there are tutorials available on the internet... googling for "ADO C++ sample code" got me to one tutorial http://www.developerfusion.com/show/4033/ -- there are certainly others out there.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • How to numberformat when using sql:query alogn with c:forEach JSTL tags

    Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
    Here is my jsp code
    <sql:query..../>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td><c:out value="${row.COL1}" /></td>
    <td><c:out value="${row.COL2}" /></td>
    </tr>
    </c:forEach>
    Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
    how can i format them to 1,000 , 10,1000 , 100,000 etc

    It is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
    I presume you discovered the JSTL <fmt:formatNumber> tag?

  • Using SQL Server credentials with Secure Store Target Application for Data Connection in Dashboard Designer

    [Using SharePoint 2013 Enterprise SP1]
    I would like to use SQL Server credentials in a Secure Store Target Application, and
    this page makes it look like it's possible but when I attempt to use the new Target Application ID as authentication for a Data Connection in Dashboard Designer, I get a generic "Unable to access data source" with no error logged in SQL Server
    logs.
    I am able to use a Target Application with AD credentials to access the SQL db without a problem. Suggestions?

    Hi,
    1. Make sure that the credential is set to
    Secure Store Target Application. Navigate to the Central Administration. Click on the
    Application Management. Click on the Manage Service Applications. Click on the
    Secure Store Service Application. Select the application ID and from the ECB menu click on the
    Set Credentials. Enter the Credential Owner, Windows User Name and the
    Windows Password.
    2. Make sure that in the Dashboard Designer “Use a stored account” is selected in the “Authentication” and the proper application ID is mentioned.
    Please refer to the link below for more information:
    http://www.c-sharpcorner.com/Blogs/14527/unable-to-access-data-source-the-secure-store-target-applic.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • 11g: can connet using SQL*PLUS, not with TOAD

    Hi
    I run into a problem with TOAD. I can't connect with my 11g database using TOAD. I don't get any messages it just gives me a little waiticon for a split second and then nothing happens. I can however connect to my 10g database using TOAD. Using SQL*Plus I can connect to both.
    I use TOAD 8.6. Do I need a newer version maybe??...

    I can connect like:
    hr/pw@xe
    or
    hr/pw@O11R1
    or directly, no problem. I can connect from SQLplus to both databases any way I want

  • Use sql function decode with Zend code

    Hi,
    I need to use sql function DECODE() in a query for PHP Code. This query works well in sql*plus but PHP returns
    the following error message:
    Parse error: syntax error, unexpected T_STRING in C:\Program Files\Zend\Apache2\htdocs\Compta\compta2.php on line 16
    the query is :
    $query =
    'select substr(c.NUM,1 ,2) Compte ,
    c.designation , a.Periode
    ,decode(substr(c.NUM,1 ,1), '1',1, '2',1,'3',1,-1) cp_type ,
    sum(credit) - sum(debit) Montant
    from ecritures a, clients b, compte c
    where
    b.NUM (+) =a.NUM
    and a.DATEECRITURE between to_date(:debut, \'dd/mm/yy\') and to_date(:fin, \'dd/mm/yy\')
    and substr(a.num,1,2) =c.num
    group by substr(c.NUM,1 ,1), substr(c.NUM,1,2) , c.designation ,a.periode
    order by compte ';
    Can any one help me ???
    Thanks by advance
    nb: Iuse Zend 2.0

    Hi,
    You need to escape single quote mark:
    decode(substr(c.NUM,1 ,1), \'1\',1, \'2\',1,\'3\',1,-1) cp_type ,
    the same way you did for to_date:
    to_date(:debut, \'dd/mm/yy\')
    Regards,
    Paweł

  • How can I use SQL TOOLKIT concurrently with Database Connectivity ?

    I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
    When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
    Can I use the SQL Toolkit VIs or the Database connectivit
    y VIs in the same installation of 6.1 ?
    Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
    Attachments:
    CNNCT.vi ‏20 KB
    CNNCT.vi ‏22 KB

    In response to your #2 below:
    Actually it is possible to have the old SQL Toolkit and new Database
    connectivity in the same installation of LabVIEW. I have only tried it on
    6i, but don't see why it wouldn't work on 6.1. The trick is not to install
    the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
    dll through ODBC while the new Database connectivity uses ADO so it is
    possible to use both methods not only in the same LabVIEW install, but it
    the same running application. It has been a while since I originally did
    this, so I am posting only to mention that it is possible and not exactly
    how to do it. If anyone is interested in more details just respond.
    Brian
    "Jeff B" wrote in message
    news:[email protected]...
    > First, direct answers to your direct questions:
    >
    > 1. Does compatbility mean that my SQL toolkit VIs are converted to a
    > form compatible with the new ADO ?
    >
    > Yes
    >
    > 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
    > the same installation of 6.1 ?
    >
    > No
    >
    > 3. Can I have the SQL Toolkit VIs appear on the functions pallette
    > and function as they did when only the SQL toolkit was installed ?
    >
    > No
    >
    >
    > Now an elaboration:
    >
    > Having the old SQL Toolkit and the new Database Connectivity Toolset
    > installed on the same version of LabVIEW on the same computer is not
    > supported.
    >
    > Once you install the Database Connectivity Toolset, any VIs written
    > with the SQL Toolkit will run, but with the ADO layer, as you
    > suspected.
    >
    > Internally, the only way we can have both the SQL Toolkit and the
    > Database Connectivity Toolset installed on the same computer for
    > troubleshooting customer issues is to have them installed on different
    > versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
    > 6.1 all installed on my computer, and I have the SQL Toolkit install
    > on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
    > LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
    > independent of the Database Connectivity Toolset if I open and run
    > them in LabVIEW 5.1.2.

  • Using SQL reporting services with java

    how can i use Microsoft SQL Server reporting services with java? The idea is that we create the reports using Microsoft SQL Server reporting services. Then we have our web application where user will select one of those report, pass 0 or more arguments and then we will show the report.

    nobody is using Microsoft SQL Server reporting
    services with java?Found this in 0.01 seconds with Google http://www.javaworld.com/javaworld/jw-01-2005/jw-0110-sqlrs.html
    Handy tool that Google.

  • Emailbody using SQL: Align Table with Headers

    I have a requirement, Where I need to align header and table contents , as a part EMAIL body in HTML format. I'm getting the resultset from a table.
    Here is the output
    Rows in these Columns have following maximum length:
    Table Name :Maximum length of table name is 40.
    Building: Maximum length is 15
    CreatedDate: Maximum length is 25
    I would appreciate it if someone can help me on this.
    Thanks in advance.
    ZK

    Hi,
    The Integration Services SendMail task only supports mail messages in plain text format. However you can easily send HTML mail messages by using the Script task and the mail capabilities of the .NET Framework.
    Please refer to the following articles about this topic:
    Sending an HTML Mail Message with the Script Task:
    http://technet.microsoft.com/en-us/library/ms403365(v=sql.90).aspx
    SSIS - Data Table displayed in Script HTML Email Body:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bc395a54-da68-4041-b142-5108a5ad250c/ssis-data-table-displayed-in-script-html-email-body?forum=sqlintegrationservices
    If you have any more questions regarding SSIS, I would suggest you open a new thread in SSIS forum for better support.
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

  • Using SQL "IN" command with PreparedStatements

    SELECT *, OTODPT FROM OEORDer
    where OTODPT IN ('RAD','LAB')
    Can you do the following with the above code:
    stmt_ = jdbcConnection_.prepareStatement(SELECT *, OTODPT FROM OEORDer where OTODPT IN (?) );
    if so what needs to be set for the PreparedStatement?
    I have tried stmt_.setString(1, "'RAD','LAB'");
    but noting was returned.

    I noticed in another thread the jschell had answered your question for another poster. Here is what he said:
    String str="select lastname from account where userid
    in ( ? )";You can't do that.
    The only solution is to create the SQL String dynamically yourself. You can either create it using the correct number of '?' to fill it, or just create it with the actual data.
    >
    Replace x with 'Tom', 'Steve' or ..
    "Tom, Steve"And the reason it doesn't work is because it ends up looking like this
    ...where userid in ( 'Tom, Steve')

  • How to use SQL filtercondition 'Start with' and 'connect by' in ADF's LOV?

    Hello every!
    I can not use 'Start with' and 'connect by' with parameter in creating ADF's LOV?
    How could I do with it?
    Alex

    assuming you are using adf 11g,
    You need to use View Criteria with the View Object attribute that has a LOV model.
    Follow this, to get some idea http://andrejusb.blogspot.com/2008/12/cascading-lovs-in-oracle-adf-11g-update.html
    hope this helps,

  • SPEL - Using SQL queries along with Function security

    Hi,
    I have tried the basic features of SPEL using function security and VO attribute. I would like to know if there is a way where I can write SQL or PLSQL blocks and set SPEL.
    I am trying to relate the functionality of Oracle Forms, where we can personalize and perform actions depending on the SQL statements.
    Could you please help.
    Regards,
    BM

    Hi Sushant,
    Thanks for the reply. I am aware of extending a view object and setting SPEL. I want a method where I can achieve SPEL without extending any BC4J object.
    Regards,
    BM

  • How to use sql "IN" operator with named bind variable in where clause ?

    Can one bind variable be used for the "IN" list ('1','2','3') ?

    rob,
    No worries. Glad it helped. Glad to see also that you're doing things right and trying to use bind variables ;)
    May I suggest adding "SOLVED" to the title of the original post?
    Best,
    John

  • How to use sql to compare with session value?

    can any 1 tell me these statement have any problem:
    String query_rocky = "SELECT cust_no, cust_name, street,town FROM Customers where cust_no = <%session.getAttribute("sessionFlag")%>";
    below is my code
    <%@page contentType="text/html"%>
    <HTML>
    <HEAD><TITLE>Customer Order Details</TITLE></HEAD>
    <%-- <jsp:useBean id="beanInstanceName" scope="session" class="package.class" /> --%>
    <%-- <jsp:getProperty name="beanInstanceName" property="propertyName" /> --%>
    <%@ page import="java.io.*, java.sql.*"%>
    <BODY>
    <CENTER>
    <H3>Customer Order Details</H3>
    <TABLE BORDER="1">
    <%
    try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection connection = DriverManager.getConnection("jdbc:odbc:rocky");
         Statement statement = connection.createStatement();
         String query_rocky = "SELECT cust_no, cust_name, street,town FROM Customers where cust_no = <%session.getAttribute("sessionFlag")%>";
         ResultSet resRocky = statement.executeQuery(query_rocky);
    while(resRocky.next()){
         int cust_no = resRocky.getInt("cust_no");
         String cust_name = resRocky.getString("cust_name");
         String street = resRocky.getString("street");
         String town = resRocky.getString("town");
    %>
    <TR>
         <TR><TH>Cust no.</TH><TD><%= cust_no %></TD>
         <TR><TH>Name</TH><TD><%= cust_name %></TD>
         <TR><TH>&nbsp</TH><TD><%= street %></TD>
         <TR><TH>&nbsp</TH><TD><%= town %></TD>
    </TR>
    <%
    }// while
    }catch (ClassNotFoundException cnfe){
    System.err.println(cnfe);
    }catch (SQLException ex ){
    System.err.println( ex);
    }catch (Exception er){
    er.printStackTrace();
    %>
    </TABLE>
    </CENTER>
    </BODY>
    </HTML>

    Hi,
    You gotta cast the session variable.
    Ex: (String) session.getAttribute("message")
    also the code should be;
    String customNo = (String) session.getAttribute("sessionFlag");
    String query_rocky = "SELECT cust_no, cust_name, street,town FROM Customers where cust_no = '" + customNo + "';";
    Rajesh

  • How to use SQL String functions with JPA and SAP NW

    Hi Everyone,
    I'm recently got the following problem:
    I have a Web Service project using JPA. But as i found out SAPs JPA implementation or more precisely openSQL restricts the use of the LOWER() function, which converts a String to lower case.
    Now I am looking for some sort of workaround. I want to execute the following JPQL query:
    SELECT bp FROM BusinessPartner bp WHERE LOWER(bp.companyName) LIKE LOWER(:companyName)
    I assume there is somewhere a flag to disable this restrictions, because there might be cases, like mine, where this standard functions are needed.
    Kind Regards,
    Carl

    Hi Vladimir,
    no it's not the same issue, because I am asking for a solution for this problem. There have to be ways to bypass this. Otherwise you can't use JPA properly. This is too much of a restriction!
    Is there no possibility to change to another implementation than openSQL?
    Regards,
    Carl
    Edited by: Carl Simon Heckmann on Feb 2, 2009 2:26 PM

  • Using SQL Server with Developer200 9i

    Hi!
    Does any body know how to use SQl Server database with Developer Suite9i/Developer2000. I got to know that Sql Server Database can be connected with developer 2000 but dont know how..?
    take care
    Imran

    Imran,
    Oracle Forms no longre supports OCA for ODBC drivers, so teh only choice left is to use a transparent gateway if available.
    Frank

Maybe you are looking for