Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

having problems with "insert into" using SQL and CF...

Status
Not open for further replies.

TeaAddictedGeek

Programmer
Apr 23, 1999
271
US
When I open up the row of data, the date and ID number are there, but the data cell is blank--and that's the important part! The data variable is a text one, and should be picking up the output of the executed statement.<br>
<br>
I'm at my wit's end trying to figure out why this is. My code is below. Can anyone help?<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
&lt;cfloop query="source"&gt; &lt;!--- begin CFLOOP query source ---&gt;<br>
&lt;P&gt;&lt;center&gt;<br>
&lt;font class="partnersbody"&gt;&lt;h3&gt;Checking source and destination(s)....&lt;/h3&gt;&lt;/font&gt;<br>
&lt;/center&gt;&lt;P&gt;<br>
&lt;cfif d_id is " "&gt;<br>
&lt;cfabort&gt;<br>
&lt;/cfif&gt;<br>
<br>
&lt;P&gt;&lt;center&gt;<br>
&lt;font class="partnersbody"&gt;&lt;h3&gt;Successful copy!&lt;/h3&gt;&lt;/font&gt;<br>
&lt;/center&gt;&lt;P&gt;<br>
&lt;cfquery datasource="wl_application" name="copy"&gt;<br>
exec master..xp_cmdshell 'robocopy #source.s_path# #source.d_path# *.* &lt;cfif source.s_recurse IS "1"&gt;/E&lt;/cfif&gt;'<br>
<br>
&lt;/cfquery&gt;<br>
&lt;pre&gt;<br>
<br>
&lt;cfoutput query="copy"&gt;#copy.output#&lt;br&gt;&lt;/cfoutput&gt;<br>
<br>
&lt;cfquery name="update" datasource="wl_application"&gt;<br>
<br>
insert into repl_log(data)<br>
values('#copy.output#') <br>
&lt;/cfquery&gt;<br>
<br>
&lt;/pre&gt;&lt;br&gt;<br>
&lt;/cfloop&gt;
 
Nothing really leaps out. Be aware of the following, however: 1. CF does NOT like names that have any characters than letters. Removing underscores resolved half my issues. 2. Insert only half works correctly - when I tried to use it it was hit or miss. I'm sure there's reason to it but I've yet to find it! be sure to get the book published by Que, written by Forta. I've no association with them, but it's been very helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top