my own database / CFOUTPUT works... now to add data viaCFML!

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default my own database / CFOUTPUT works... now to add data viaCFML!

    i'm a promoter for a concert venue. i'm responsible for maintaining an accurate
    calendar of upcoming concerts, so my first real-world CFML trail is for this
    application . i'm very excited to get it going!

    i have created my DSN, ODBC connection, uploaded everything to my server, and
    much to my surprise, my cfquery / cfoutput is displaying the information from
    my simple MS Access database perfectly... just the way i wanted it! (a db which
    i made w/ familar Excel format, imported .csv data, and wha-la, i had my .mdb!
    i had no idea it was this easy... i'd have been here long ago!)

    but, now for the true test... the purpose of this web application is so that i
    can add data to the mdb via an "administrative login" w/ CFML so that every
    time a new concert is booked, i can log into my admin section, enter the new
    data into the appropriate fields corresponding to my db, and the new concert
    info will be automatically displayed by ColdFusion for the appropriate people
    to view.

    if the cfoutput was this easy, i can't imagine that adding to the .mdb via
    CFML could possibly be much more difficult.

    i achieved success w/ the cfoutput via the art gallery tutorial in the
    ColdFusion MX Developer Edition tutorial. but, i can't find any other tutorials
    for learning how to input data into the .mdb. can someone please point me in
    the right direction on my local drive if it exists in the MX 7 edition? if not,
    what about an online tutorial, or some type of free resource where i can learn
    this simple task for boosting productivity?

    thank you!!

    woo-hoo! coldfusion rocks!

    jsabarese Guest

  2. Similar Questions and Discussions

    1. Help Needed : Flash/ASP database works in Firefox butnot IE!
      Hi fellow flash wielders, I am currently building this guestbook in Flash 2004, and using ASP to talk to an Access database. Everything works...
    2. Import Data from flat-database to relational-database
      Before I start I need some tips and pleas excuse my bad english. I have two databases, one is flat and one is a relational database. example ...
    3. NEWBIE HELP Import Data from flat-database to relational-database
      I want to import Data from a simple Database, which contains all Information in one big record into a relational Database and split up the big...
    4. Can't seem to add to access database online, offline works fine
      I developed an asp.net store with vb.net offline and everything works fine. The user is prompted to log in when they try to add to shopping cart...
    5. importing works database into excel
      Please help, I have my addresses and phone numbers in a works database it is a wbd file and when I try to import them in 'import external data' I...
  3. #2

    Default Re: my own database / CFOUTPUT works... now to add data via CFML!

    Get yourself a copy of 'Teach Yourself SQL in 10 Minutes' by Ben Forta
    published by Sams.

    It's not really ColdFusion you need to learn for inputting data into
    your database; it's SQL.

    Doug
    doug777 Guest

  4. #3

    Default Re: my own database / CFOUTPUT works... now to add datavia CFML!

    another great book that I used when I first started with ColdFusion was
    Macromedia Training from the Source for Coldfusion MX..... It is a thin
    paperback workbook, that guides you through all the basic of ColdFusion without
    any of the complicated nonsense that sometimes turns people off when learning
    something new.

    Here's a few links for you:

    [url]http://www.amazon.com/exec/obidos/ASIN/0672325675/qid=1109196006/sr=2-1/ref=pd_b[/url]
    bs_b_2_1/103-8579693-6723027

    dspent Guest

  5. #4

    Default Re: my own database / CFOUTPUT works... now to add datavia CFML!

    thank you!

    okay, i will definitely look into that... for now, i've just been doing trial
    and error... w/ emphasis on the error... could you tell me what i need to
    change here to make this work?

    <CFinsert DATASOURCE="cbshows">
    tablename DATE SHOW ARTIST_WEBSITE ALL_AGES TIX_ADVANC TIX_DOS SUPPORT
    SUPPORT_WEBSITE SUPPORT_2 SPRT_2_WEB
    AGENT AGENT_CONTACT PUBLICIST PUB_CONTACT LABEL LABEL_WEB LABEL_CONT
    LABEL_EMAIL MANAGEMENT
    MGMNT_CONT MGMNT_PHON MGMNT_EMAIL
    </CFinsert>

    or

    <CFquery DATASOURCE="cbshows">
    DATE SHOW ARTIST_WEBSITE ALL_AGES TIX_ADVANC TIX_DOS SUPPORT
    SUPPORT_WEBSITE SUPPORT_2 SPRT_2_WEB
    AGENT AGENT_CONTACT PUBLICIST PUB_CONTACT LABEL LABEL_WEB LABEL_CONT
    LABEL_EMAIL MANAGEMENT
    MGMNT_CONT MGMNT_PHON MGMNT_EMAIL
    </CFquery>

    neither work. the latter (if i recall correctly) tells me i'm missing the
    tablename syntax (all the caps w/ underscores are my table names) the
    datasource ref is correct though-- cbshows is the datasource name.

    this will get me going if someone can help w/ that part please

    jsabarese Guest

  6. #5

    Default Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML

    The problem is that you have not specified your attributes correctly...and it
    looks like you don't have the fieldnames or the values specified either.....

    Use this as a guide: (for a cfinsert tag)

    <cfinsert
    datasource="cbshows"
    tablename="NAME OF TABLE TO INSERT DATA INTO"
    formfields="NAMES OF FIELDS SEPARATED BY COMMAS"
    >
    This is also the same as: (For CFQUERY)

    <cfquery name="qInsertValues" datasource="cbshows">
    INSERT INTO tablename to insert into (LIST OF FIELDS TO BE INSERTED SEPARATE
    BY COMMAS)
    VALUES (LIST OF VALUES FOR EACH FIELD SEPARATE BY COMMAS)
    </cfquery>


    For example I have a query that inserts article ratings into a table called
    RATINGS for the knowledgebase app I'm building:
    The query looks like this:

    <cfquery name="qCreateRating" datasource="kbank">
    INSERT INTO dbo.Ratings (ArticleID, RateHistory, LastRatedBy, RatingGiven)
    VALUES (#qCreateArticle.ArticleID#, #RateHistory#, '#LastRatedBy#',
    #RatingGiven#)
    </cfquery>

    Also head on over to [url]http://tutorial1.easycfm.com/[/url]

    Hope that helps....

    -Jones


    dspent Guest

  7. #6

    Default Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML

    Jones,

    Thank you!!! this is very helpful.

    While we're on the subject, can you help me to decide if / when i would want to use
    the tags <cfinsert> versus <cfquery>?

    thanks again!

    jsabarese Guest

  8. #7

    Default Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML

    ummmmm....

    not sure I follow you...could you post the code that's "not working"... That would help.
    dspent Guest

  9. #8

    Default Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML

    all of my troubles were solved when i used DreamWeaver to insert the recordset
    query for me. i simply switched from "Common" to "Application" view, and used
    the Insert Record Wizard. it did add more code than simply SQL, but it's helped
    me to better understand some more CFML as well. i was very happy when i finally
    discovered how easy it is!

    jsabarese Guest

  10. #9

    Default Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML

    Yea... I based my BlueFish code library for coldfusion off the macromedia code
    snippets in dreamweaver... Unfortunatly there is no dreamweaver for linux, so I
    either run it in vmware, or use a native editor(which I much prefer), so i just
    made snippets of code for that :) hehe i am so smart

    genmud Guest

Posting Permissions

  • You may not post new threads
  • You may 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