Ask a Question related to Coldfusion Database Access, Design and Development.
-
micpik #1
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
-
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... -
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... -
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... -
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! -
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 -
mpwoodward *TMM* #2
Re: directory contend write into database
On 2005-07-08 04:02:49 -0500, "micpik" <webforumsuser@macromedia.com> said:
My first guess would be that because your outer loop is over a query> <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>
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



Reply With Quote

