Professional Web Applications Themes

refresh page using CF - Coldfusion - Advanced Techniques

Hello! I'm new here! I'm from Indonesia. I wanna ask how can I refresh my page with CF? And could you find some errors in my query below? <cfquery datasource="assessment" name="q_adduser" dbtype="odbc"> INSERT INTO lgdata_users (username, password, group) VALUES ('#username#','#passwd#','#group#') </cfquery> Is there something wrong? Coz i can't find it, but it keeps telling me there is syntax error in INSERT INTO statement. Thx..Nana...

  1. #1

    Default refresh page using CF

    Hello! I'm new here! I'm from Indonesia.


    I wanna ask how can I refresh my page with CF? And could you find some
    errors in my query below?

    <cfquery datasource="assessment" name="q_adduser"
    dbtype="odbc">
    INSERT INTO lgdata_users (username, password, group)
    VALUES ('#username#','#passwd#','#group#')
    </cfquery>

    Is there something wrong? Coz i can't find it, but it keeps telling me
    there is syntax error in INSERT INTO statement.

    Thx..Nana

    n4n4_qutie Guest

  2. #2

    Default Re: refresh page using CF

    There are several ways to refresh a page - click on a link, let a certain
    number of seconds go by, etc. Can you be more specific as to what event causes
    the page to refresh?

    As for your INSERT statement, two things come to mind. Are you sure that
    username, passwd and group are all defined? Print them out using CFOUTPUT
    immediately before the CFQUERY. Also, are they all strings? Is group defined
    as a numeric value in the database?


    jdeline Guest

  3. #3

    Default Re: refresh page using CF

    Is it possible that one of the db-fields is misinterpreted by CF? I remember having had a similiar problem using the name "file".
    STEINWO1 Guest

  4. #4

    Default Re: refresh page using CF

    STENWO1 is correct. I used a field called 'date' in my tables and found that
    when I tried to do an insert or update of a table with that field name, CF
    didn't like my field name. I'd change the GROUP field name to group1 or
    something else and see if that helps. Your syntax is fine.

    Phox68 Guest

  5. #5

    Default Re: refresh page using CF

    The problem with the query is that one of the fields is named group, which is
    an sql keyword.

    As far as using cold fusion to refresh a page, cflocation would work. You had
    better be careful though, self refreshing pages could send you into an endless
    loop.

    Dan Guest

  6. #6

    Default Re: refresh page using CF

    > jdelinewrote:
    There are several ways to refresh a page - click on a link, let a
    certain 
    event causes 
    sure that 
    CFOUTPUT 
    group defined 

    I use session in my application. When the user logout, the application
    delete the session.username then page goes to Login Page. The problem
    is I still can go to the that page with just typing the URL even I
    already use "isDefined(session.username)". So I guess I have to
    refresh my page after logout process. PHP can do it. Does CF has it?


    maybe i have to try cflocation. Could you give me an example?

    And about my query, it happens in every my 'Insert Into' query. It
    wasn't because of the name is used in SQL, 'coz I've tried to type it
    like:

    <cfquery datasource="assessment" name="q_adduser" dbtype="odbc">

    INSERT INTO lgdata_users
    VALUES ('#username#','#passwd#','#group#')
    </cfquery>

    it works!

    God..I'm going crazy

    n4n4_qutie Guest

  7. #7

    Default Re: refresh page using CF

    Hello! I'm new here! I'm from Indonesia.
    Hi. Welcome.

    I wanna ask how can I refresh my page with CF?
    <cfheader name="Refresh" value="0; URL=http://www.myDomain.com/myPage.cfm">

    <cfquery datasource="assessment" name="q_adduser"
    dbtype="odbc">
    INSERT INTO lgdata_users (username, password, group)
    VALUES ('#username#','#passwd#','#group#')
    </cfquery>
    Is there something wrong?
    Yes, GROUP is a http://support.microsoft.com/kb/q209187/. Change that column
    name.


    BKBK Guest

  8. #8

    Default re:refresh page using CF

    Hey STEINWO1! You're right...the query mistakes was because of the
    fieldname. Thank u so much

    Dan Bracuk.....cflocation works only for redirecting, are you sure it
    will refresh session variable that have been erased?

    n4n4_qutie Guest

Similar Threads

  1. how can i Refresh my page????
    By Adventure6924 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: May 2nd, 09:13 PM
  2. Page Refresh
    By dickson.matt@gmail.com in forum ASP.NET Building Controls
    Replies: 0
    Last Post: September 13th, 03:30 PM
  3. page refresh?
    By newcf in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: September 1st, 01:41 PM
  4. refresh a page every so often
    By Laszlo Szijarto in forum ASP.NET General
    Replies: 3
    Last Post: July 2nd, 12:56 PM

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