directory contend write into database

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default directory contend write into database

    Hello,

    we started with CF after 5 years again. and test the functions. OK the Problem
    is, we must load the contend of a Directoryfilenames into the database. It must
    work for our picturegallery over 3000 pics.

    Our samplecode you can see in the attachment.

    After runs the code, we can see with the output tag the files with names on
    screen but we dont save automatic in
    our database

    Please we hopy the group can help us.

    Micpik

    <cfdirectory directory="\\Sc\dddweltencf_fsc\bildergalery\" action="list"
    name="pics" >

    <cfloop query="pics">
    <cfdirectory directory="\\Sc\dddweltencf_fsc\bildergalery\#pics .name#"
    action="list" name="this">
    <cfloop query="this">

    #pics.name# #this.name#

    <cfquery name=pics datasource=bildergallery>
    INSERT INTO gallery(pics_name, this_name)
    VALUES('#pics.name#', '#this.name#')
    </cfquery>

    </cfloop>
    </cfloop>
    Here yo can see the names on sreen
    <cfoutput query="pics">#pics.name##this.name# </cfoutput>

    micpik Guest

  2. Similar Questions and Discussions

    1. Cannot Write to Database
      Hi I am just starting to teach myself to use Ultradev with databases I have created a simple test site in Dreamweaver Ultradev that is linked to a...
    2. write to database without giving write permission to IIS
      Hi there, I have some ASP code that writes to access database. For security reason I do not want IUSER to give write permission to database...
    3. Write contents of Dropdown list to a database
      i am dynmically creating a dropdown list and i am wondering how to write the contents of the dropdown list to a database. Purpose: i am creating...
    4. How to write a file into Access Database
      I want to use ASP to write file into Access Database,the file is limits 300K,how to realize it? Any idea will be appreciated!
    5. Looking for a webservice example to write to a database in VB
      Any ideas? -- ______________________ David Fetrow HelixPoint LLC. http://www.helixpoint.com davef@helixpoint.com
  3. #2

    Default Re: directory contend write into database

    On 2005-07-08 04:02:49 -0500, "micpik" <webforumsuser@macromedia.com> said:
    > <cfloop query="pics">
    > <cfdirectory
    > directory="\\Sc\dddweltencf_fsc\bildergalery\#pics .name#" action="list"
    > name="this">
    > <cfloop query="this">
    > #pics.name# #this.name#
    > <cfquery name=pics datasource=bildergallery>
    > INSERT INTO gallery(pics_name, this_name)
    > VALUES('#pics.name#', '#this.name#')
    > </cfquery>
    >
    > </cfloop>
    > </cfloop>
    > Here yo can see the names on sreen
    > <cfoutput query="pics">#pics.name##this.name# </cfoutput>
    My first guess would be that because your outer loop is over a query
    named "pics" and your inner-most cfquery is also named "pics", that's
    going to cause a problem. Try renaming your inner query and see if
    that helps.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* 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