Help with updating a database while in cfloop
Greetings. I'm having some difficulties in updating a
database using cfquery inside of a cfloop.
Background:
I've got a text file that I need to interpret, line for line,
and then update an existing database with information from that
text file. For example, the text file might say
jdoe~103 Anywhere St.~East Nowhere~New Jersey~05784~
asmith~8963 North St.~Crabapple Cove~Maine~01390~
(etc...you get the idea)
So, I use a CFFILE to read the file, and then calculate the
number of lines (records to be updated in the database) using
listlen / 5 (in this example). From there, I:
<cfloop index="record" from="1" to "#numberoflines#">
<cfloop index="field" from="1" to "5">
<cfset position = ((record - 1) * 5) + field>
<cfelseif field EQ 1>
<cfset form.username =
ListGetAt(newcontents,position,"~")>
<cfelseif field EQ 2>
<cfset form.street =
ListGetAt(newcontents,position,"~")>
(etc...through EQ 5)
</cfloop>
<cfquery name="updatedatabase"
datasource="clientlist">
UPDATE clients
SET
Street= '#form.street#',
(etc)
WHERE email = '#form.username#'
</cfquery>
</cfloop>
The problem I am having is that it updates the very first
record in the set of records to update, but then it does not update
any subsequent records.
Why?
Sorry if the code is crude. Is there a better way of doing
this? If so, great detail would be helpful :) Relatively new at
this.
-Brian
quote:
Originally posted by:
Dan Bracuk
Updating a db from a file using cold fusion is generally
inefficient and should only be used as a last resort. If your db
has any bulk loading/updating utilities, consider using them. Maybe
you can use cold fusion to upload the file and ftp it to your db
server or something like that.
Better yet, that file has to come from somewhere. Is there a
way you can update your db instead of generating a file in the
first place?
The file starts as an output generated by a web user (an
administrator on the software) which creates a text file containing
email addresses, one per line. An external process which I have no
control over takes that file and generates another file containing
information about each of those e-mail addresses (last name, first
name, etc) one per line. I can't change that process. So, I'm left
with an external text file that I need to parse and then put into
the database...all through a web interface. The goal here is that
an administrator of the software, who does not have direct access
to the database, can (using cold fusion processing) update the
database with new information on each e-mail address without my
intervention.
-Brian
Similar Messages
-
I have rolled out bunch of updates across few hundred workstation systems.
Few of the desktops have failed to install SOME of the updates and just can't get my head around as to why?
Looking at one of the workstations, I can see 5 updates are pending download at 0%.
Some of these fail after a while and with in Software Centre, I can see 'Help with updates - The software change returned error code 0x87D00215(-2016411115).'. Not exactly sure what this means, but I have tried clearing the cache and
rebooting the workstations few times.
(I have also tried to use Windows Update and install one of these manually, which worked.)Investigating this further, I have found the following in CAS.log:
ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Successfully created download request {ED6E9E5C-E806-43CA-9F93-49AC72D1DEAD} for content 53bf87a2-bedf-4def-b0ec-9637613c3429.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Requesting locations synchronously for content 99ddb078-b780-4605-8fac-9607fe56450d.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/99ddb078-b780-4605-8fac-9607fe56450d', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Requesting content 99ddb078-b780-4605-8fac-9607fe56450d.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Successfully created download request {67B7E59B-A386-4EA8-BF39-2EB64B108A6C} for content 99ddb078-b780-4605-8fac-9607fe56450d.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Requesting locations synchronously for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/61d33de7-9582-41e3-82fc-3e0f970b60f3', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Requesting content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
Successfully created download request {12E48136-B545-4C42-9745-9FF97CE38D52} for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4) -
MAC OS 10.6.8 Using Safari 5.1 Needing Help With Updating Adobe Flash
Hello-
Recently Adobe Flash installed an icon in my System Preferences and when I click the icon there are several tabs. One allows updates to check automatically. It says it will install the latest version of Flash without having to remove the previous version, but I have never been told that a newer version is available unless I clcik "check now." although "Check for updates automatically" is checked, I do not know where it tells me a newer version is available. Also, there has been 5 "newer versions" available since this icon was installed in System Prefeences, I have only found out about the newer versions when I clicked "Check Now." If I read that with this new way to install the latest Mac version of Flash does not require me to uninstall the previous version of Flash how do I install the most recent version of Flash? Does it come in an email?
Since it is not telling me that there is a more recent version of Flash unless I click "Check Now" should I still do it the way I used to install the latest version of flash? (The way before this icon was added to System Preferences)?
I would appreciate help with updating Flash to the most recent version. I used to uninstall the older version, restart the browser and download the most recent version and install it. It always worked find but this was before there was an Adobe icon in my system Preferences.Hello,
The way you used to do this (uninstall, restart the browser, etc.) is still definitely valid and probably the "safest" way to get a new version installed. Uninstalling shouldn't be required, but it definitely doesn't hurt. If you feel comfortable doing it the old way, please feel free to continue using that process.
As for notifications, this is a bit trickier, but in general you should be notified within 30 days (or so) after a new player is released. This usually occurs when the browser loads swf content. Clicking the button will, like you mention, immediately check. Another alternative to finding out when a new player is released is to subscribe to our Flash Player Releases feed.
Is there a way to be automatically notified when a new Flash Runtime release is made?
Thanks,
Chris -
I need help installing latest updates for CS6. I have Win 7 and have tried updating from the Help - Updates menu. The error is: U43M1D207.
Thanks for your response. I am in the United States in So. Arizona.
Date: Fri, 5 Oct 2012 12:21:45 -0600
From: [email protected]
To: [email protected]
Subject: Help with updates for CS6
Re: Help with updates for CS6 created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
Crunkle1 you are welcome to work directly with our support team for guided assistance. If you go to http://www.adobe.com/ and select Help and Contact Us you should be given the option to contact our support team via telephone. Which country/region are you in?
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4752605#4752605
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4752605#4752605
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4752605#4752605. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
HT201541 I need help with updating my browser.
I need help with updating my browser. Its telling me that Safari is outdated.
That is a very old version belonging to Snow Leopard. I take it you are not actually running Yosemite.
Upgrading to Yosemite
You can upgrade to Yosemite from Lion or directly from Snow Leopard. Yosemite can be downloaded from the Mac App Store for FREE.
Upgrading to Yosemite
To upgrade to Yosemite you must have Snow Leopard 10.6.8 or Lion installed. Download Yosemite from the App Store. Sign in using your Apple ID. Yosemite is free. The file is quite large, over 5 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
OS X Mavericks/Yosemite- System Requirements
Macs that can be upgraded to OS X Yosemite
1. iMac (Mid 2007 or newer) - Model Identifier 7,1 or later
2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) - Model Identifier 5,1 or later
3. MacBook Pro (Mid/Late 2007 or newer) - Model Identifier 3,1 or later
4. MacBook Air (Late 2008 or newer) - Model Identifier 2,1 or later
5. Mac mini (Early 2009 or newer) - Model Identifier 3,1 or later
6. Mac Pro (Early 2008 or newer) - Model Identifier 3,1 or later
7. Xserve (Early 2009) - Model Identifier 3,1 or later
To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
Are my applications compatible?
See App Compatibility Table - RoaringApps.
Upgrading to Lion
If your computer does not meet the requirements to install Mavericks, it may still meet the requirements to install Lion.
You can purchase Lion at the Online Apple Store. The cost is $19.99 (as it was before) plus tax. It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
Lion System Requirements
1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
or Xeon processor
2. 2GB of memory
3. OS X v10.6.6 or later (v10.6.8 recommended)
4. 7GB of available space
5. Some features require an Apple ID; terms apply. -
My son has a Droid Inc2 and has had multiple problems with updates. They always happen overnight and he gets a message telling him to do a battery pull to avoid further messages regarding the update. Each time we eventually have to do a hard reset so that we can restore the service to the phone. This has been happening for quite sometime now starting back in early August.
The current software running is 3.02.605.1. My wife messaged a VZW Support Rep on Twitter about it and was told it was an old software version and to keep trying to pull the update. We have stopped trying since having to do a reset this weekend. This is really aggravating and I need to know what we should do. Right now if you check for software update it acts like it's checking but then does nothing more. Then in a couple days the phone will try to update overnight.
Someone please tell me what needs to be done. I have looked thru the oter posts and couldn't find what I needed and got tired of looking at all the pages of posts regarding the updates.
Thx!AntonioC_VZW wrote:
Hi 2tonpickup,
I understand your concerns regarding your son's phone. We also value your time and have different processes in place to troubleshoot any issues with your phones. Please keep in mind that this is a peer to peer forum and while our Social Media Team monitors these forums the best way to get assistance troubleshooting a device is to call us at 800-922-0204 from a different phone and have the faulty device fully charged and available when calling.
Your device includes a one year manufacturer's warranty and we'll be happy to replace it with a Certified Like New unit of the same model if we are unable to resolve your concerns and phone is under warranty. Please visit this LINK for replacement process details.
To the original poster: Please keep in mind that the Verizon employees are moderators, meaning that they mostly make sure we abide by the rules and regulations of the forums. While they do chime in occationally to help, your best bet is really to call tech support first or to go into a Verizon store. -
Hi friends,
In the below am trying to update a custom table using a call function in update task. I dont see the table getting updated can someone take a look at it and let me knw what the problem is? I have the commit work statement and also marked the function module as an update one in the attribute. Please help me . Thanks in advance! kathy
*& Include ZINBOUND_TEST
Report: ZINBOUND_TEST.
DATA: l_dest TYPE REF TO if_bgrfc_destination_inbound,
l_unit TYPE REF TO if_trfc_unit_inbound,
l_inb_dest TYPE bgrfc_main_i_dst,
lv_matid TYPE /sapapo/matid,
lv_matnr TYPE /sapapo/matnr,
lv_maktx type /SAPAPO/MAKTX,
lv_langu TYPE LANGU.
data: lt_product type STANDARD TABLE OF ZUPDATE,
ls_product type ZUPDATE.
lv_matid = '123'.
lv_langu = 'E'.
lv_maktx = 'Materia1'.
CALL FUNCTION 'Z_TEST' IN UPDATE TASK
EXPORTING
iv_matid = lv_matid
iv_maktx = lv_maktx
iv_langu = lv_langu .
COMMIT WORK.
select * from zupdate into corresponding fields OF TABLE lt_product.
if sy-subrc <> 0.
write 'no records added'.
else.
loop at lt_product into ls_product.
write: / ls_product-MATID,
ls_product-MAKTX.
endloop.
endif.
FUNCTION Z_TEST.
*"*"Update Function Module:
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_MATID) TYPE /SAPAPO/MATID
*" VALUE(IV_MAKTX) TYPE /SAPAPO/MAKTX
*" VALUE(IV_LANGU) TYPE LANGU
data: itab type standard table of zupdate,
wa_itab type zupdate.
wa_itab-matid = iv_matid.
wa_itab-maktx = iv_maktx.
wa_itab-langu = iv_langu.
append wa_itab to itab.
update zupdate from table itab .
ENDFUNCTION.
Edited by: ka reddy on Sep 24, 2009 4:14 PM
Edited by: ka reddy on Sep 24, 2009 4:15 PM
Edited by: ka reddy on Sep 24, 2009 4:16 PM
Edited by: ka reddy on Sep 24, 2009 4:17 PM
Edited by: ka reddy on Sep 24, 2009 4:21 PMHey Naimesh thanks for the reply. yeah i read that document way before and i started taking a stab at implementing it.
I started with update task to see how it behaves and then wanted to go with BGRFC tats when i had the update issue.
Now that am done with update i want to implement BGRFC.
I have modified the earlier prgm...Can you give me some ideas how to extend this? Thanks!
*& Include ZBGRFC_INBOUND_TEST
Report: ZBGRFC_INBOUND_TEST.
DATA: l_dest TYPE REF TO if_bgrfc_destination_inbound,
l_unit TYPE REF TO if_trfc_unit_inbound,
l_inb_dest TYPE bgrfc_main_i_dst,
lv_matid TYPE /sapapo/matid,
lv_matnr TYPE /sapapo/matnr,
lv_maktx type /SAPAPO/MAKTX,
lv_matid1 TYPE /sapapo/matid,
lv_matnr1 TYPE /sapapo/matnr,
lv_maktx1 type /SAPAPO/MAKTX,
lv_langu1 TYPE LANGU,
lv_langu TYPE LANGU.
data: lt_product type STANDARD TABLE OF ZUPDATE,
ls_product type ZUPDATE.
lv_matid = '125'.
lv_langu = 'E'.
lv_maktx = 'Materia3'.
**--Get the inbound destination for BGRFC.
IF l_inb_dest IS INITIAL.
SELECT SINGLE * FROM bgrfc_main_i_dst INTO l_inb_dest.
ENDIF.
l_dest = cl_bgrfc_destination_inbound=>create( l_inb_dest-destination ).
l_unit = l_dest->create_trfc_unit( ).
CALL FUNCTION 'Z_TEST' IN BACKGROUND UNIT l_unit
EXPORTING
iv_matid = lv_matid
iv_maktx = lv_maktx
iv_langu = lv_langu .
select * from zupdate into corresponding fields OF TABLE lt_product.
if sy-subrc <> 0.
write 'no records added'.
else.
loop at lt_product into ls_product.
write: / ls_product-MATID,
ls_product-MAKTX.
endloop.
endif.
Edited by: ka reddy on Sep 24, 2009 5:16 PM -
Help with Update failure please
I have Adobe Photoshop CC running on win 7 64 bit. When doing the latest batch of updates one keeps failing with the error message "Adobe CSXS Infrastructure 4 Installation Failed Error Code U44M1P7" Can anyone help with this?
Thanks Eshant
I had since been researching this on the web and it seems it is a very
common fault which has not always been fixed by the full re-install
advocated by Adobe in the link you kindly provided. I therefore decided
to keep trying for a couple of days before resorting to such a drastic
solution.
After several failures to get CSXS Infrastructure 4 to install, both via
the CC Desktop App and from the "Help" menu within Photoshop CC, I had
one more try this morning and this time it seems to have installed
without a hitch. I have no idea why, as I have made no system changes,
but for now I do seem to have solved the problem as my installation of
Photoshop CC is now reporting that it is fully up to date.
Thanks for your response.
Pixellated -
Help with updating the grid(CONNECT 4)
Hi, this a small portion of my connect 4 game program. I have a problem with updating the grid. During the game, whenever I enter a column number for the first time, the program works properly. But when i try to give the same column for the second time, the chip falls in the same row instead of going to the second row. Can anybody help me write the method that will do this.
This is the method that switches the chip's value(By the way discard the variable 'turn' because that works properly, it is used in another method):
//Method 2: Updates the matrix
public static void UpdateMatrix (char location, char turn)
c.println (location);
switch (location)
case '1':
matrix [5] [0] = turn;
break;
case '2':
matrix [5] [1] = turn;
break;
case '3':
matrix [5] [2] = turn;
break;
case '4':
matrix [5] [3] = turn;
break;
case '5':
matrix [5] [4] = turn;
break;
case '6':
matrix [5] [5] = turn;
break;
case '7':
matrix [5] [6] = turn;
break;
} //End Method 2Can anybody describe me how to write a method or write a method that will tell the computer to assign the chip to the next row. You an edit my method if u want to. THANX A LOT!!!HERE IS THE METHODS SO FAR!
//Method 3: Checks if assigned place for the chip has a chip there already
public static void emptyspot (int column, int row)
for (row = 5 ; row >= 0 ; row--)
for (column = 0 ; column <= 6 ; column++)
if (matrix [row] [column] == 'X' || matrix [row] [column] == 'O')
row--;
}I AM GETTING AN ERROR!!! AT THE BOTTOM OF MY PROGRAM! SOMEBODY HELP!
Message was edited by:
Taufiq -
I NEED SOME HELP WITH UPDATING MY IPOD TOUCH PLEASE
i need some help with my ipod the version is 3.1.3 and every time I'm trying to update it says it can not be restored then it says unknown error so i need some help updating my ipod to version 4.2
If you mean you're trying to update your ios go to settings/general/software update. then you should see the latest ios just tap it and it will automatically update your ipod. If you're trying to restore your ipod (as it's not quite clear in your query) try doing it through itunes instead of on the device itself
-
Help with update to 2.3
can anyone help with my x10 im unable to update to android 2.3 my phone just says you already have the latest softwere!!!! its driving me insane...
Unfortunately that generally means that the network/country that your handset was manufactured for has not yet passed approval on the 2.3 update. With this being the case there is little that I can advise you do to resolve this until acceptance has been passed on this update.
- Official Sony Xperia Support Staff
If you're new to our forums make sure that you have read our Discussion guidelines.
If you want to get in touch with the local support team for your country please visit our contact page. -
Create table temp_sibs as
(select 1701 sib_1, 1702 sib_2 from dual
union all
select 1171,1172 from dual
union all
select 1701,1172 from dual
union all
select 1171,1174 from dual
union all
select 1173,1176 from dual
union all
select 2001,2004 from dual
union all
select 2001,2006 from dual
union all
select 2002,2006
from dual)
create table temp_sib_data as
(select 111 pid, 1701 sibid, 5 amt from dual
union all
select 111 pid, 1176 sibid, 5 from dual
union all
select 222 pid, 2006 sibid, 5 from dual
union all
select 333 pid, 2001 sibid, 5 from dual
union all
select 333 pid, 2002 sibid, 5 from dual
union all
select 333 pid, 1171 sibid, 5 from dual
First table is a lookup table that defines relationships sib_1 is related to sib_2
Second table consists of a column pid and column sibid which is either sib_1 or sib_2
The user would pass parameter pid and sibid and I want to update all the related rows with any matching sibid to 0.
It is like 1701 matches with 1702 and 1701 matches with 1174 so indirectly 1701 and 1174 match...and 1171 matches because
1171 matches with 1174
so all 1701,1702,1171,1172, 1173,1174,1176 match (indirectly with each other)
So for example if the user passes 333 pid and 2001 rows with 333,2001 and 333,2002 should update the amt to 0
and if the user passes 111 and 1176 than 1st 2 rows should be updated to 0.Hi,
try this:
DEFINE PID='333'
DEFINE sibid='2001'
-- SELECT is only for test.
-- Replace SELECT with: UPDATE TEMP_SIB_DATA SET AMT = 0
SELECT * FROM TEMP_SIB_DATA
WHERE PID = &PID AND SIBID IN (
WITH TEMP AS(
SELECT SIB_1, SIB_2 FROM TEMP_SIBS
START WITH SIB_1 = &&SIBID OR SIB_2 = &&SIBID
CONNECT BY NOCYCLE PRIOR SIB_2 = SIB_1
OR PRIOR SIB_1 = SIB_2
OR SIB_2 = PRIOR SIB_2
OR SIB_1 = PRIOR SIB_1
SELECT SIB_1 FROM TEMP
UNION ALL
SELECT SIB_2 FROM TEMP
);For pid=333 and sibid=2001 it returns desired records for update:
PID SIBID AMT
333 2001 5
333 2002 5For pid=111 and=1176 it returns one row - 1176 matches only with 1173 and 1173 doesn't match with any other rows,
so only 5th row, not first 2, should be updated ... maybe I missed something ?
PID SIBID AMT
111 1176 5 -
Help with UPDATE table and database RELATIONSHIPS
HI there, I have been trying to create an update table for
weeks now and keep getting error messages.
The database has a table named:
"books" in the table cells are "idbook" and "book".
"suppliers" in the table cells are "idsupplier" and
"supplierName".
"category" in the table cells are "idcategory" and
categoryName"
They all have a relationships with this table:
"results" in the cells are "idbook", "idsupplier" and
"idcategory".
This "results" table brings all of the above tables together.
When I try to do an update, i am doing one to the results
table. Is this correct?
The updates have problems because when drawing the text to
the update table to view it comes in text form.
When trying to update, it wont becuase all of the cells in
the results table are numeric. This is because of the
relationships.
Can anyone suggest where i may be going wrong.
Ask anything you need to.
TAMM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("MM_UserName") <> "") Then
Recordset1__MMColParam = Session("MM_UserName")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connSeek_STRING
Recordset1.Source = "SELECT * FROM Query1 WHERE UserName = '"
+ Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim rsUpdate
Dim rsUpdate_numRows
Set rsUpdate = Server.CreateObject("ADODB.Recordset")
rsUpdate.ActiveConnection = MM_connSeek_STRING
rsUpdate.Source = "SELECT * FROM tblSpecies"
rsUpdate.CursorType = 0
rsUpdate.CursorLocation = 2
rsUpdate.LockType = 1
rsUpdate.Open()
rsUpdate_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<link href="css%20files/paragraph.css" rel="stylesheet"
type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a
.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/Publicationb.gif','images/Factsheetsb.gif')">
<table width="100%" height="100%" border="1"
cellpadding="0" cellspacing="0" bordercolor="#5D5D5D">
<tr>
<td colspan="2">
<div align="right"></div>
<div align="left"></div>
</td>
</tr>
<tr>
<td colspan="2"><table width="100%" height="100%"
border="0" cellpadding="0" cellspacing="0"
bordercolor="#5D5D5D">
<tr>
<td valign="top"><form
ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
<table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><div
align="center"></div> <table border="1" align="center"
cellpadding="2" cellspacing="0" bordercolor="#FFFFFF">
<tr bgcolor="ECECD7">
<td colspan="2"><div align="center">
<p><strong><font size="3">Update Key Word
& Category</font></strong></p>
</div>
</td>
</tr>
<tr>
<td><div align="center">
<p><font size="1">Enter Up to 10 Species /
Product
Name</font></p>
</div>
</td>
<td><div align="center">
<p><font size="1">Select a
Category</font></p>
</div>
</td>
</tr>
<tr>
<td colspan="2" bordercolor="#D0D09D">
<%
While ((Repeat1__numRows <> 0) AND (NOT
Recordset1.EOF))
%>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr><td width="50%"><div align="center">
<input name="f1" type="text" id="f13"
value="<%=(Recordset1.Fields.Item("TimberSpecies").Value)%>"
size="33">
</div></td>
<td width="45%"><div
align="center"></div></td></tr></table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend %>
<div align="center"> </div> <div
align="center">
</div></td></tr><tr>td
colspan="2"> </td></tr><tr><td
colspan="2"><div align="right"><p><font
size="1">To Finalise Your Changes Please Press the Update
Button
<input name="update2" type="submit" id="update"
value="Update">
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%=
rsUpdate.Fields.Item("TimberSpecies").Value %>"> -
Help with updating databse with cfloop
I want to move data from one column to another. I thought I could just query points2 column then use a cfloop to update the data to points1 column. Finally null out points2 column.
Below is my code on the first 2 steps. Unfortunately, I get the following error:
Syntax error in UPDATE statement.
The error occurred in wwwroot\forms\changepoints.cfm Line 18
<cfquery name="getPoints" datasource="#dsn2#">
SELECT leaderID, points2
from leaderboard
</cfquery>
<cfloop query="getPoints" startrow=1 >
<CFQUERY NAME="DoUpdate" DATASOURCE="#dsn2#">
UPDATE leaderboard
SET points1=#getPoints.points2#
WHERE leaderID=#getPoints.leaderID# (line 18)
</CFQUERY>
</cfloop>
What am I doing wrong?Like Dan said before, I think you could replace this:
<!--- query to get all points --->
<cfquery name="getPoints" datasource="#dsn#">
SELECT leaderID, points2
from leaderboard
where (points2 IS not NULL) AND (tournID = 1)
</cfquery>
<!--- loop the points into the new column: points2 --->
<cfloop query="getPoints" startrow=1 >
<CFQUERY NAME="DoUpdate" DATASOURCE="#dsn#">
UPDATE leaderboard
SET points1=#getPoints.points2#
WHERE (leaderID=#getPoints.leaderID#) AND (tournID = 1)
</CFQUERY>
</cfloop>
With this:
<cfquery name="updatePoints" datasource="#dsn#">
UPDATE leaderboard
SET points1=points2
WHERE (points2 IS NOT NULL) AND tournID =1
</cfquery>
Update queries run record by record, so you don't have to worry about it scrambling the values between rows (which you expressed as a concern in reply to Dan). It's best to let the database handle this rather than by looping in ColdFusion - it will be much more efficient that way.
-Carl V. -
[SOLVED] Help with updating conky-colors PKGBUILD
I'm looking to update my PKGBUILD for https://aur.archlinux.org/packages/conky-colors/ to support the latest version. After getting annoyed with DeviantArt replacing the zips of the package when it is updated upstream, I've decided to pull in specific commits from the git repo instead. I'm trying to use the ...#commit= option on the source line. It seems to be building ok but I'm getting the following errors:
/usr/bin/makepkg: eval: line 2225: unexpected EOF while looking for matching `"'
/usr/bin/makepkg: eval: line 2226: syntax error: unexpected end of file
Can anyone give any help as to what may be the cause here. If i remove the #commit it goes away. I need to clean up the depends section to remove those that are no longer needed, but I can do that easy enough.
# Maintainer: Android_808 <android underscore 808 at hotmail dot com>
# Contributor: Pauline123 <321eniluap at gmail dot com>
# Contributor: Shanto <shanto at hotmail>
# Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com>
pkgname=conky-colors
_pkgname=conky_colors
pkgver=9.0
pkgrel=1
pkgdesc="An easier way to configure Conky."
arch=('i686' 'x86_64')
url="http://gnome-look.org/content/show.php/CONKY-colors?content=92328"
license=('GPL')
depends=('pystatgrab' 'ttf-liberation' 'hddtemp' 'curl' 'lm_sensors' 'conky' 'ttf-droid' 'ttf-ubuntu-font-family' 'ttf-ms-fonts')
makedepends=('perl' 'git')
optdepends=('conky-lua')
conflicts=('ttf-openlogos' 'ttf-weather')
options="!strip"
install=$pkgname.install
source=("$pkgname::git+https://github.com/helmuthdu/conky_colors.git#commit=f4b530a94d5f3f73d4c21c4417c51b6011a71b28")
md5sums=('SKIP')
build() {
cd "$srcdir/conky-colors"
make
package() {
cd "$srcdir/conky-colors"
mkdir -p ${pkgdir}/usr/share
mkdir -p ${pkgdir}/usr/share/fonts
mkdir -p ${pkgdir}/usr/bin
cp -v conky-colors ${pkgdir}/usr/bin
cp -v -r conkycolors ${pkgdir}/usr/share
#cp -v -r fonts ${pkgdir}/usr/share/conkycolors
cp -v -r fonts/conkycolors ${pkgdir}/usr/share/fonts/TTF
ln -fs /usr/share/conkycolors/bin/conkyTask ${pkgdir}/usr/bin/ct
#ln -fs /usr/share/conkycolors/fonts/conkycolors ${pkgdir}/usr/share/fonts/
chmod +x ${pkgdir}/usr/share/conkycolors/scripts/*
chmod +x ${pkgdir}/usr/share/conkycolors/bin/*
chmod -R 755 ${pkgdir}/usr/share/conkycolors/
Last edited by android_808 (2013-11-11 19:33:06)I didn't post the install earlier because I've never had an issue with it, been using the same file for several releases of several custom built packages. The eval: lines posted appear before "Making package: conky-colors 9.0-1 (Mon 11 Nov 18:58:03 GMT 2013)" but doesn't prevent it from building. Just don't get what's causing them.
Install files "s have matching end ", brackets have brackets. namcap PKGBUILD gave no error.
PKGBUILD ' has matching '
" has matching "
( has matching )
Maybe you are looking for
-
i have an apple iphone4 im facing the problem that my phone senser is not working when i rotate the phone in videos or music play there is working from the senser can u tell me what can i do for this....
-
HP C7280 all-in-one duplex printing problem - Long and short sided binding!
I use a HP 7280 all-in-one printer and have the duplexer attached. Up to installing snow leopard I have been able to print two sided documents from ipages no problems. But now every time I try to print a two sided document in flips the second side ve
-
Create API append in the transaction COMM_ATTRSET
Hi Friends, We have implemented the Note <b>602673</b> to Download R/3 ERP Material Sales Status MVKE-VMSTD to CRM. We have overlooked the point in the Note where it is mentioned that the check box <b>Create API append</b> should be checked while inc
-
Wsrp-requireRewrite for URLs in resource response ?
I'm using Portal 10.1.4 serving WSRP content from a portlet producer running on 10.1.3.2 (JDev embedded OC4J). I want to use an AJAX resource request to serve a fragment of portlet markup containing further portlet and AJAX URLs. URL rewriting for fu
-
Hi all! I want to change the net price for around 100 PO's. How to do this? Thx in advance. Yuvi.