Professional Web Applications Themes

database connectivity - HTML & CSS

Hi there, I dont seem to be able to create a database connection, on a particular site, I have created the site, chosen PHP for the doent type, setup the sites testing server, but yet there is still only a text next to number 1, and doesn't seem to be progressing any futher. When I change the doent type to JSP, sudenly I have the option to create the db connection, however not when php is selected. Any Ieas? Ross....

  1. #1

    Default database connectivity

    Hi there,

    I dont seem to be able to create a database connection, on a particular
    site, I have created the site, chosen PHP for the doent type, setup the
    sites testing server, but yet there is still only a text next to number 1,
    and doesn't seem to be progressing any futher. When I change the doent
    type to JSP, sudenly I have the option to create the db connection, however
    not when php is selected.

    Any Ieas?

    Ross.


    Ross Guest

  2. #2

    Default Re: database connectivity

    I wouldn't bother with DW's tools in that respect. Just code it by hand.


    rob::digitalburn Guest

  3. #3

    Default Re: database connectivity

    Argh.

    I hear ya..

    "rob::digitalburn" <robdigitalburn.net> wrote in message
    news:ch4vo7$j0q$1forums.macromedia.com...
    >I wouldn't bother with DW's tools in that respect. Just code it by hand.
    >
    >

    Ross Guest

  4. #4

    Default DataBase Connectivity

    I had tried to define a SQL server as the datasource in the coldfusion
    administrator site. But I happened to get the following error even when I have
    opened all the sockets in the SQL Server(by diabling the firewall in the SQL
    server).

    Connection verification failed for data source: <database name>
    java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing
    socket. Connection refused: connect
    The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Connection refused: connect

    I would appreciate any kind of help as I still cannot find the problem in
    defining the datasource.
    Thnx in advance.



    only2suri Guest

  5. #5

    Default Re: DataBase Connectivity

    Surprisingly I experience the exact same problem and get the same error message
    when setting the datasource name in the CF admin site. Incidentally, we run SQL
    and CF on two separate servers (W2K3). I've tried disabling both firewalls;
    still no joy.

    I would also appreciate any ideas on this. Thanks

    Kiplan Guest

  6. #6

    Default Re: DataBase Connectivity

    Kiplan wrote:
    > Surprisingly I experience the exact same problem and get the same error message
    > when setting the datasource name in the CF admin site. Incidentally, we run SQL
    > and CF on two separate servers (W2K3). I've tried disabling both firewalls;
    > still no joy.
    >
    > I would also appreciate any ideas on this. Thanks

    See
    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18652[/url]

    Common question.

    Good luck.

    javabuzz Guest

  7. #7

    Default Re: DataBase Connectivity

    I too have the same problem,do any one know any site that mentions the step by step procedure to connect a SQL server as a data source to the cold fusion administration.

    surenr Guest

  8. #8

    Default Re: DataBase Connectivity

    make sure you are running service pack 3 on SQL Server

    check the database properties, if it is not version 8.0.760(SP3) it will refuse your connection
    hih Guest

  9. #9

    Default Re: DataBase Connectivity

    Did you try this?
    [url]http://www.robisen.com/index.cfm?mode=entry&entry=BE1AB594-55DC-F2B1-F392552E0A41542A[/url]


    niko1 Guest

  10. #10

    Default Re: DataBase Connectivity

    Actually I was able to resolve it by installing SQL SP4 and configuring the
    JDBC driver from here [url]http://www.macromedia.com/go/tn_18652[/url]. I checked my event
    log and found that there was and 'advisory' whenever sql service was initiated
    citing that the service pack version that I had was insecure and thus all
    TCP/IP ports were disabled. That explained why I got the 'Error establishing
    socket'.

    Kiplan Guest

  11. #11

    Default database connectivity

    hi,
    Here is a clarrification to be made...
    In the Flex input form that has been used to connect the jsp in the middle
    tier, the output is a .txt file. Here an error occurs that says..."HTTP
    Service fault: A start tag had no corresponding end tag". Attached is the code
    that has been used. Could anyone please help me what the details of why the
    error occurs and its solution?
    Awaiting your response.
    Thanks.
    Murali.J
    Junior developer

    darrliing Guest

  12. #12

    Default database connectivity

    hi,
    Here is a clarrification to be made...
    In the Flex input form that has been used to connect the jsp in the middle
    tier, the output is a .txt file. Here an error occurs that says..."HTTP Service
    fault: A start tag had no corresponding end tag". Attached is the code that
    has been used. Could anyone please help me what the details of why the error
    occurs and its solution?
    Awaiting your response.
    Thanks.
    Murali.J
    Junior developer

    here is the code i used

    <?xml version="1.0" encoding="utf-8"?>

    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
    backgroundColor="#FFFFFF">
    <mx:HTTPService id="srv" url="employeehttp.jsp" method="POST">
    <mx:request>
    <firstName>{firstName.text}</firstName>
    <lastName>{lastName.text}</lastName>
    <salary>{salary.text}</salary>
    <startDate>{startDate.text}</startDate>
    </mx:request>
    </mx:HTTPService>

    <mx:Form>
    <mx:FormItem label="First Name">
    <mx:TextInput id="firstName"/>
    </mx:FormItem>
    <mx:FormItem label="Last Name">
    <mx:TextInput id="lastName"/>
    </mx:FormItem>
    <mx:FormItem label="Salary">
    <mx:TextInput id="salary"/>
    </mx:FormItem>
    <mx:FormItem label="Start Date">
    <mxateField id="startDate"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button label="Add Employee" click="srv.send()"/>
    </mx:FormItem>
    </mx:Form>

    </mx:Application>


    here is jsp code i used


    <% page import="java.io.File" %>
    <% page import="java.io.FileOutputStream" %>
    <% page import="java.io.PrintWriter" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; cht=iso-8859-1">
    <title>Untitled Doent</title>
    </head>

    <body>
    <%
    String firstName= request.getParameter("firstName");
    String lastName= request.getParameter("lastName");
    String salary= request.getParameter("salary");
    String startDate= request.getParameter("startDate");

    String name = "bhargavi.txt";
    System.out.println(name);
    File f = new File(name);
    FileOutputStream fos = new FileOutputStream(f);
    PrintWriter pw = new PrintWriter(fos);
    pw.println(firstName);
    pw.println(lastName);
    pw.println(salary);
    pw.println(startDate);
    pw.flush();
    pw.close();
    fos.close();
    // Some business logic to process the data
    %>
    <status>ok</status>
    </body>
    </html>



    Text

    darrliing Guest

  13. #13

    Default Re: database connectivity

    You say that the output is text, not XML, right? So you need to tell HTTPService what format the result will be in:

    <mx:HTTPService resultFormat="text" ... />
    peterent Guest

  14. #14

    Default Re: database connectivity

    Or fix the jsp to return xml. This jsp, besides writing the file, is
    returning an html page to Flex, is that what you want? How do you plan to use
    it in Flex?

    I think you should return the status of the write operation in xml. That way,
    you can present the user with options on error in flex.

    Remove ALL HTML tags, use this declaration:
    response.setContentType("text/xml");

    and then return xml as necessary as in this example catch block:
    ....
    catch ( Exception e ) {
    out.print("<status status='error' statusdescription='Exception' "
    + "exceptionmessage='" + e.getMessage() + "' "
    + "exceptionstring='" + e.toString() + "' "
    + "/>");

    Tracy

    ntsiii Guest

  15. #15

    Default Re: database connectivity

    thanx very much, now it is working fine

    with regards
    Murali.J
    darrliing Guest

  16. #16

    Default Database Connectivity

    Hi Friends,
    I am a new member in this forum. I am stuck with one problem. How can i
    connect flash with a database. Remember this is a standalone program. Not for
    web use. ie, my aim is to read or write data to and from a database. Is that
    possible in flash.

    OR

    How can i write and read data to and from a file. Anybody can help me.....
    If anybody have the code?


    G@I Guest

  17. #17

    Default Re: Database Connectivity

    Hi

    Checkout SharedObject for local storage up to 100Kbytes

    You could also use xml but you may still need some middleware to write to an xml file.

    Hope it helps
    The Feldkircher Guest

  18. #18

    Default Database connectivity

    can any body help me how i can connect to the sql server in flash and send and receive data from the database
    naumananwar Guest

Similar Threads

  1. Connectivity through Xml
    By RajeshBhadra in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: June 7th, 08:08 PM
  2. Database Connectivity with Mozilla Database
    By Mr.Reader in forum Macromedia Flash Player
    Replies: 0
    Last Post: May 24th, 03:23 PM
  3. Database connectivity in MX
    By Showjumper in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 19th, 11:52 PM
  4. DB2 V8 Connectivity
    By Paul Shaw in forum IBM DB2
    Replies: 0
    Last Post: July 18th, 10:45 PM
  5. Replies: 3
    Last Post: July 10th, 08:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139