Using cfform to interact with databases

hi there, I am just trying to get ito using the cfform tag,
and I thought it would be as easy to do insert into table ect using
server behaviours, but clearly not! could somebody point me the
right direction of some good tutorials please, to show me how to do
all the wonderful interaction with Databases that I have been able
to do with normal dreamweaver html forms...
Many thanks

I have found that <cfform> is a bit of a pain. I prefer
using the standard <form>
and writing the SQL myself. Much cleaner!
<cfquery ...
INSERT INTO t_someTable
(column1, column2)
VALUES
'#trim(form.field1)#',
'#trim(form.field2)#',
</cfquery>

Similar Messages

  • Ivr interaction with database

    How IVR interact with database. Any idea?
    I mean to say mechanism it follows to populate data using IVR system for inbound and outbound calls.

    AnkitAshokAggarwal wrote:
    How IVR interact with database. Any idea?
    I mean to say mechanism it follows to populate data using IVR system for inbound and outbound calls.
    SQL  is the only mechanism to populate data using IVR system for inbound and outbound calls.

  • How to interact with database?

    Hi,
    I am exploring sampleportal application in Weblogic Portal8.1 SP4. There in login portlet they are using login.jsp file which uses examples.login.DirectorBacking class for login form authentication. DirectorBacking class uses default com.bea.p13n.security.Authentication class’s authenticate method for authentication. I could not understand the basic functionality of Authentication class as how it interacts with the database.
         Can we use simple JDBC for the login authentication in login.jsp ?

    U can define several authentication realms - which could be RDBMS, LDAP etc.
    Does that answer your question?

  • Interacting with database from web

    Here's the situation. I have some dumb terminal (client) that interacts with a server, which holds a database. I want users to be able to query that database from the web and have it create a page with the results.
    Since I did not know cgi, or servlets, etc., I devised a primitive method. I was planning on having the database create html files and send it to the webserver so the users can interact with the premade html files. This is not a good idea :) since there would be thousands of files made.
    What is the best way to interact with the database? Servlets? Can you use servlets freely or do you need a commercial license? Please exuse my newbiness :)

    You don't need any commercial software to use Servlets and JSPs.
    Have a look at the Tomcat servlet engine from Jakarta:
    http://jakarta.apache.org
    I expect that if you search these forums (particularly the JDBC and JavaServer Pages forums) you'll find various examples of JSPs and Servlets that connect to a database to allow primitive querying capabilities.
    Hope this helps.

  • Using java to interact with a website

    I'm looking to build a program that will function as an alternate front end for an online database so that users can perform batched operations. Is there a way to have java navigate and interacte with a website? This would be something a macro would do, except that I need to be able to interact with the desktop, among other things. Also, I'm stuck with internet explorer, as the IT people don't want Firefox on any of the machines, so that excludes the iMacros add on.
    anyone got an idea? thanks

    DrClap wrote:
    Unless you also control the website. However, even in that case I think that web services are superior in the long run to HTML-scraping.Agreed. I was assuming that if the website was one's own, one wouldn't resort to scraping, but you're right, that needs to be stated.

  • Query regarding XI interaction with database

    Hi all,
    I have got the Oracle database and SAP R/3 system
    Is it possible that through JDBC adapter ,
    a) Direct fetching of data from database
    b) Data should come in XI and after mapping should be  
        posted in SAP R/3 .i.e complete automated process
    c) Is it possible to put direct query statement in XI
        while connection with database through JDBC adapter
        E.g For fetching the vendor data from database
        Select * from .... 
    Thanks in advance
    Shikha Jain

    Shikha,
    <i>a) Direct fetching of data from database</i>
    In the JDBC Sender adapter you have to mention the SQL Query.
    <i>b) Data should come in XI and after mapping should be
    posted in SAP R/3 .i.e complete automated process</i>
    This is what XI does. There is no manual intervention needed.
    <i>c) Is it possible to put direct query statement in XI
    while connection with database through JDBC adapter
    E.g For fetching the vendor data from database
    Select * from ....</i>
    your question a is same. You can execute a SQL statement in the Adapter which polls the database in the intervals you mention. It could be a SELECT or EXEC PROC etc.
    regards
    Shravan

  • 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 iChat to interact with Twitter

    I'm a Twitterholic and love using Twitterrific but Twitter has recently added tracking which outputs to SMS or IM only. Since Twitterrific doesn't support this new feature I've tried the Twitter IM bot on iChat. I've abandoned the Twitter IM bot before because of it's spotty and one way service. Now I'm wondering if maybe there's something wrong on my end.
    Anyone else having problems interfacing with Twitter IM bot? When it works, I can change my status and send it commands but I have yet to receive a direct posting from it. Wondering what other people's results were.

    I've chatted with the Twitter devs and they have admitted that AIM support is not really solid yet. It's on their list of features to fix, but for now they recommend that I use a Jabber account to communicate with the Twitter IM bot. I did this, using Gmail, and I can attest that there is a world of difference between bot support through Jabber versus AIM. Tracking works like a charm, as do notifications and direct tweets. If you don't want to run Twitterrific, or would rather just do it all through iChat and have less taxing your CPU, then set up Jabber in iChat using your Gmail address. I've been very pleased with the results. It's been rock solid as opposed to the spotty, buggy performance through AIM.
    All the best
    (TheLaughingImp on Twitter)

  • An effective way for JSP/servlets to interact with databases

    Hi
    I was wondering if anyone has an effective way of connecting to databases using javabeans and JSP.
    I am new to all this JSP stuff and would appreciate some help
    cheers

    hai,
    it is better if u go for javaBeans
    for connection purpose
    as this is reused many times
    and u can avoid large stuff of code
    in the jsp.Also try connection pooling pooling if
    user name to db for most user is same !!!!
    sample code for database bean
    import java.sql.*;
    import java.io.*;
    * This class determines the database connectivity by defining the database url,
    * database driver and database connection and other functions to prepare & execute
    * sql queries.
    public class DBBean {
    String dbURL; //database url
    String dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver"; //database driver
    private Connection dbCon; //database connection
    private PreparedStatement pre;
    private Statement s ;
    boolean prepareflag=false;
    public IntranetBean() {
    super();
    public boolean connect() throws ClassNotFoundException, SQLException {
    //install the driver
    Class.forName(dbDriver);
    //opens a connection
    dbCon = DriverManager.getConnection("jdbc:odbc:ureodbc");
    return true;
    public void close() throws SQLException {
    //close the statement
    if(prepareflag){pre.close();}
    else{
    s.close();}
    //close the connection
    dbCon.close();
    prepareflag=false;
    public ResultSet execSQL(String sql) throws SQLException {
    //gives a statement object
    s = dbCon.createStatement();
    //execute the sql command
    ResultSet r = s.executeQuery(sql);
    return (r == null) ? null : r;
    public void execUPDATE(String sql) throws SQLException {
    //gives a statement object
    s = dbCon.createStatement();
    //execute the sql command
    s.executeUpdate(sql);
    public boolean prepareSQL(String sql) throws SQLException {
    //gives a prepared statement object
    pre = dbCon.prepareStatement(sql);
    prepareflag=true;
    return true;
    public boolean execpreparedSQL(String sql) throws SQLException {
    //execute the sql command
    pre.execute(sql);
    return true;
    public ResultSet getpreparedResultSet() throws SQLException {
    //get resultset
    ResultSet r = pre.getResultSet();
    return (r == null) ? null : r;
    public void setInt(int i,int no) throws SQLException {
    pre.setInt(i,no);
    public void setDouble(int i,double dbl) throws SQLException {
    pre.setDouble(i,dbl);
    public void setString(int i,String str) throws SQLException {
    pre.setString(i,str);
    public void setDate(int i,Date d) throws SQLException {
    pre.setDate(i,d);
    public void setTime(int i,Time tm) throws SQLException {
    pre.setTime(i,tm);
    public void setNull(int i,int type) throws SQLException {
    pre.setNull(i,type);
    }

  • Examples of Using PHP to interact with R/3

    Possible example:
    For small businesses wanting to interract with an R/3 backend that my be run by a service provider, then they have a low cost alternative to Java development.
    A simple example could be a small online reseller that does not maintain their own stock. By connecting their PHP based website to their suppliers R/3 system they can provide stock and price details to the customer.

    Just take a look at the weblogs listed in this thread
    Weblogs related to PHP and SAP

  • Using java to interact with html.

    I want to create a program that goes to html pages and presses some buttons. where do I look?

    Hi duo,
    please try and use the code snippet i am pasting below.The code is accessing a page and then submitting a form on the page by making the url in the code itself.
    import java.io.*;
    import java.net.*;
    public class SubmitHTML
         public static void main(String[] args)
              System.out.println("*********** GOING TO ACCESS PAGE START ***********");
              SubmitHTML s1 = new SubmitHTML();
              s1.getHTMLPage();
              System.out.println("*********** GOING TO ACCESS PAGE END ***********");
         private void getHTMLPage()
              //phase 1
              try
                   String str = "";
                   char ch1=(char)0x0d; //\r
                   String strURL = "http://tahiti.oracle.com/pls/tahiti/tahiti.error_search";
                   URL url = new URL(strURL);
                   HttpURLConnection.setFollowRedirects(false);
                   HttpURLConnection urlConn = (HttpURLConnection)url.openConnection();
                   //urlConn.setRequestProperty ("Content-Type", "application/x-www-form-urlencoded");
                   urlConn.setDoInput(true);
                   //urlConn.setUseCaches(false);
                   System.out.println("LOGIN: Reading..." + urlConn.getHeaderField(0));
                   System.out.println("getContentEncoding ..." + urlConn.getContentEncoding());
                   System.out.println("getContent..." + urlConn.getContent());
                   System.out.println("getContentType..." + urlConn.getContentType());
                   BufferedReader br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
                   String line;
                   boolean flag = false;
                   while((line=br.readLine())!=null) {
                        //System.out.println(line);
                        str = str + line + String.valueOf(ch1);
                   System.out.println("*********** THE FIRST PAGE RETURNED BY GOOGLE IS START ***********");
                   System.out.println(str);
                   System.out.println("*********** THE FIRST PAGE RETURNED BY GOOGLE IS END ***********");
                   String strQuery = "ORA-9989";
                   strURL = "http://tahiti.oracle.com/pls/tahiti/tahiti.error_search?search="+strQuery+"";
                   System.out.println("The url is ::" + str);     
                   url = new URL(strURL);
                   HttpURLConnection.setFollowRedirects(false);
                   urlConn = (HttpURLConnection)url.openConnection();
                   //urlConn.setRequestProperty ("Content-Type", "application/x-www-form-urlencoded");
                   urlConn.setDoInput(true);
                   //urlConn.setUseCaches(false);
                   br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
                   str = "";
                   while((line=br.readLine())!=null) {
                        //System.out.println(line);
                        str = str + line + String.valueOf(ch1);
                   System.out.println("\n\n\n");
                   System.out.println("*********** THE PAGE RETURNED BY GOOGLE AFTER SUBMITTING START ***********");
                   System.out.println("LOGIN: Reading..." + urlConn.getHeaderField(0));
                   System.out.println("getContentEncoding ..." + urlConn.getContentEncoding());
                   System.out.println("getContent..." + urlConn.getContent());
                   System.out.println("getContentType..." + urlConn.getContentType());
                   System.out.println(str);
                   System.out.println("*********** THE PAGE RETURNED BY GOOGLE AFTER SUBMITTING END ***********");
              catch (Exception e)
    anjani

  • Using FILE to interact with the CI from an App server

    Hi All.
    We have a custom code function where a user takes a text file and uploads it into the SAP system. The file is immediately processed and a new 'outbound' file is created. Currently, we have the dirctory structure set-up on out CI/DB server. Our users access the system from one of 2 application servers.
    The issue we have is that due to the definition in FILE, when the users execute the report, it errors out. This is becasue when they execute, SAP looks to the local server - the app servers - for the directory. As stated, this directory lives on the CI. Does anyone know how to adjust the functionality of FILE so that I can point the program to execute on the CI and not the app server? Thanks!

    Hello Tim,
    We have a similar scenario like you but dont face this issue. 2  things are imüportant here:
    1. The directory residing on CI should be accessible from the other application server i.e the mount should be correct.
    2. The logical file path name in FILE should be correct. This is very important.
    Believe me we have a more complex arrangement where 5 SAP s are involved and the directory resides on only one of them
    Also FILE cannot dicate on which system the program is executed.It purely depends on the app server where the user is logged in.
    Regards.
    Ruchit.

  • MDT 2012 with Database do not use the OSD* properties

    Greetings,
    I use MDT 2012 Update1 with Database to deploy clients. without use SCCM, and without DHCP.
    I find that the all the properties in the details settings begin with OSD**, such as "OSDComputerName", "OSDAdapter0Gateways", "OSDAdapter0IPAddressList"
    etc. cannot be used.
    for example, if I set the "ComputerName" as "Client1" and set "OSDComputerName" as "Client01" in the database, after the client installed, the client's Computer Name
    is set to Client1 but not Client01.
    and the client's IP address is not use the value in OSDAdapter0IPAddressList, but use the IP address that in the Boot WinPE begining screen I inputed.
    would you please help me in this case.
    Thanks 
    Frank@Hiweb 冯立超@瀚博资讯

    Thank you Michael,
    Glad to get help from you!
    I have according to you guide "Manipulating the Microsoft Deployment Toolkit database using PowerShell" created
    a script to bulk input clients settings just now. thank you!
    I have a question about IP address, as following:
    I use MDT 2012 with Database, without SCCM, without DHCP.
    so I must set IP address at the beginning of the WinPE.
    thus, the final IP address on the clients is the IP address I set at WinPE boot time, but not the IP address in the Database
    OSDAdapter0AddressList, even I set OSDAdapterCount to 1.
    would you please guide me how to correct it.
    Thank you and best regards.
    Frank@Hiweb 冯立超@瀚博资讯

  • Java interaction with websites?

    Hey,
    I'm been learning java for a few months now, and know the basics well, I have written a few small programs, including one which transfers songs from iPod to computer.
    I need some advice on where to start on my next project. Basically I want to make a program which automatically performs tasks in the background on websites, for example listing an item on ebay, or uploading a video to youtube. And I'd also like it to read information from different pages, so that I could maybe gather a database of prices from ebay, or somthing along those lines.
    Which classes could I use java to interact with html?
    Where do I start? :)
    My java vocabulary isn't great yet ;)

    Ryanz wrote:
    Ok ... I'm checking it out at the moment, are there any other maybe simpler ways? Or can somone explain how to get the JAX-WS installed and ready to use with eclipse?Ryanz,there are few things involved here.
    1).First and foremost you need to findout whether if respective website offers you any kind of Web-Services to serve your cause.
    Just as an example eBay offers set of services to serve your cause to know more about this you can visit the below links
    [http://www.xml.com/pub/a/2005/09/28/ebay-metadata-web-services.html]
    [http://developer.ebay.com/community/featured_projects/default.aspx?name=Code%20Samples%20Project]
    Similarly identify whether if respective other focused webservice providers offer any specific services serving your cause.
    2).Analyse their service specifications
    3).Identify and Plan for list of Data Transfer Objects to which we can bind this service
    4).Implement for a Stub (may be using Apache Axis) or use JAX-RPC or use JAX-WS or any other related technologies to implement your Webservice Client.
    Coming back to using tools like Apache Axis,JAX- RPC or JAX-WS.
    you might be intrested in looking towards the below set of turtorials
    [http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html]
    [http://www.ibm.com/developerworks/webservices/library/ws-castor/]
    [http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXRPC.html]
    [http://www.ibm.com/developerworks/edu/j-dw-java-jaxrpc2-i.html]
    [http://java.sun.com/webservices/docs/2.0/tutorial/doc/]
    [http://www.myarch.com/create-jax-ws-service-in-5-minutes]
    It is not nessary that a provider has to provide relvant data in form offering webservices and sometimes they can offer you different specs which could be Like regular Java RMI services or DCOM object or something like Feeds(RSS 2.0/ATOM) for providing Latest updates on your account.I'd say it'd be more work for us to identify what kind of service the provider is provding us and how best make use of it so that we can use the relavant data in our application.
    and believe me in most of the cases only point 4 changes after going through point 1,2 & 3.
    Hope that helps :)
    REGARDS,
    RaHuL

  • Populating selectItems with database values

    I'm looking for an example of how to populate a combo box using the selectItems tag with database records. I'd like to be able to populate the item value and item label. I am able to build an array to populate this way, but can not find a good database example. Could someone point me in the right direction?
    Thanks

    public class SQLView {
    private SQLView() { } //Prevents instantiation
    public class Field {
    public static final String id = "id";
    public static final String name = "name";
    public class ProductCategory {
    public static final String select =
    "select id, name from ProductCategory order by name";
    DataAccess.java
    public DataAccess(String confEnvName, String dataSourceName) throws Exception {
    try {
    InitialContext ic = new InitialContext();
    Context envCtx = (Context) ic.lookup(confEnvName);
    DataSource ds = (DataSource)envCtx.lookup(dataSourceName);
    name = confEnvName + '/' + dataSourceName;
    con = ds.getConnection();
    } catch (Exception ex) {
    throw new Exception("Couldn't open connection to database: " +
    dataSourceName + ' ' + ex.getMessage());
    public ResultSet getResultSet(String statement) throws SQLException {
    PreparedStatement st = con.prepareStatement(statement);
    ResultSet rs = st.executeQuery();
    return rs;
    public List resultSetToSelectItems(String statement) throws SQLException {
    List list = new ArrayList();
    ResultSet rs = getResultSet(statement);
    try {
    while (rs.next()) {
    list.add(new SelectItem(new Integer(rs.getInt(SQLView.Field.id)),
    rs.getString(SQLView.Field.name)));
    finally {
    rs.close();
    return list;
    Catalog.java
    public synchronized List getCategoryList() throws SQLException {
    if (categoryList == null) {
    categoryList = dataAccess.resultSetToSelectItems(SQLView.ProductCategory.select);
    if (!categoryList.isEmpty()) {
    categoryId = (Integer)((SelectItem)(categoryList.get(0))).getValue();
    else {
    categoryId = new Integer(0);
    return categoryList;

Maybe you are looking for