CFUPDATE problem with field name beginning with a number
I have a form (actually several) that is gathering data for a survey. I tried to use cfupdate to update the data elements and got a string index out of range error. I tested again without the form fields that began with numbers and it worked just fine. I then tried to enclose the offending field names in () and []. Both times I got same error. Does anyone have a work around for this? The code and error are below.
Changing the field names is not really an option. This survey has almost 400 data points and most of the fields begin with the question number.
Thanks
DW
<cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', '2_a_fy12', '2_b_fy09', '2_b_fy10', '2_b_fy11', '2_b_fy12', '2_c_fy09', '2_c_fy10', '2_c_fy11', '2_c_fy12', '2_d_fy09', '2_d_fy10', '2_d_fy11', '2_d_fy12', '2_e_fy09', '2_e_fy10', '2_e_fy11', '2_e_fy12', '2_f_fy09', '2_f_fy10', '2_f_fy11', '2_f_fy12', '2_g_fy09', '2_g_fy10', '2_g_fy11', '2_g_fy12', '2_h_fy09', '2_h_fy10', '2_h_fy11', '2_h_fy12', '2_i_fy09', '2_i_fy10', '2_i_fy11', '2_i_fy12', '2_j_fy09', '2_j_fy10', '2_j_fy11', '2_j_fy12', '2_k_fy09', '2_k_fy10', '2_k_fy11', '2_k_fy12', '2_l_fy09', '2_l_fy10', '2_l_fy11', '2_l_fy12', central_office, dept_office, incl_other, 3_a_fy09, 3_a_fy10, 3_a_fy11, 3_a_fy12, 3_b_fy09, 3_b_fy10, 3_b_fy11, 3_b_fy12, 3_c_fy09, 3_c_fy10, 3_c_fy11, 3_c_fy12, 3_d_fy09, 3_d_fy10 3_d_fy11, 3_d_fy12, 3_e_fy09, 3_e_fy10, 3_e_fy11, 3_e_fy12, 3_f_fy09, 3_f_fy10, 3_f_fy11, 3_f_fy12, 3_g_fy09, 3_g_fy10, 3_g_fy11, 3_g_fy12, 3_h_fy09, 3_h_fy10, 3_h_fy11, 3_h_fy12, 3_i_fy09, 3_i_fy10, 3_i_fy11, 3_i_fy12, 3_j_fy09, 3_j_fy10, 3_j_fy11, 3_j_fy12, 3_k_fy09, 3_k_fy10, 3_k_fy11, 3_k_fy12, 3_l_fy09, 3_l_fy10, 3_l_fy11, 3_l_fy12">
String index out of range: -2
The error occurred in C:\Inetpub\wwwroot\directory\process_arra_suvey_2.cfm: line 12
12 : <cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', ...
I think you have run one of CFUPDATE's limitations. I am not 100% certain, but I do not think cfupdate provides a way to escape invalid column names like yours. In which case you may need to do a regular UPDATE within a cfquery instead... or rename your columns.
fields that began with numbers
Most databases discourage creating column names that start with a number (or other restricted characters). While many databases will allow you to escape invalid names, it is simpler all around to avoid them altogether. Otherwise, you may have to escape the names in every single query. The recommendations vary, but usually object names that begin with a letter, and contain only letters, numbers and underscores are considered safe.
This survey has almost 400 data points and most of the fields begin with the question number.
Four-hundred (400) is a lot of columns for a single table. The fact that they all them seem to contain the same type of information (ie response to a question) is an indication that data should probably be stored in a separate table, as rows, not columns. For example questions could be stored in one table, possible answers in another, and the results of an individual test/survey stored in a third table. A structure like that is much easier to query, can easily accommodate changes (add/remove questions, responses, etcetera) without having modify the table every time.
Similar Messages
-
Goodmorning, I have a problem with user number of my smartphone Blackberry Curve 8900: when I call a numer of my adress book, on the right, appears a user number, that I don't know. Why dont'appears mine? I don't have buy this smartphone personally, but I had it (used) through the smartphone's owner...I think that the user number that appears on my display is his. How I can do to remove it?
Waiting for an answer, thank you.Hello scricciolina90
Welcome To Support Forums
On or Curve 8900 from the Home screen > click Options > Click Advanced Settings > SIM Card > Highlight the phone number > Press the Menu key and click Edit SIM Phone Number > Check that field or Enter you Mobile number in that field .
Good luck.
Click " Like " if you want to Thank someone.
If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it. -
Hello, i have a problem with this number code 213:19, please help me!
Hello, i have a problem with this number code 213:19, please help me!
dan
What version of Premiere Elements and on what computer operating system is it running?
If you are using Premiere Elements 13, have you updated it to 13.1 yet? If not, please do so using an opened project's Help Menu/Updates.
What type of user account are you using....local administrator or domain type?
Please review the following Adobe document on the 213.19 issue. Have you read that already?
Error 213:19 | Problem has occurred with the licensing of this product
ATR -
Cannot contact the Adobe Service, I have a problem with the number.
Hi,
I would like to have more information in regard of the Adobe DC. My intent is to buy the product and use it in my office, we are a small company (4 PC).
If I'm not wrong I should take the Standard Plan for Business, but I cannot arrange any payment request for information because I have a problem with the number I am supposed to call.
Is there any other way to know if this software suit fine for me and my company, and most of all how much it will cost.
Thank you for your consideration.
Have a nice day!
I look forward to hearing from you.
Best,
AugustoHi Avgvstvs67,
Please refer this link : https://acrobat.adobe.com/in/en/pricing/business-pricing.html
Regards,
Rahul -
Problem getting field names with OCI
Hi,
I am trying to retrieve the names of select fields through the
OCI using OCIParamGet() followed by OCIAttrGet(). This seems to
work OK, in most cases, except occasionally I get one field name
concatenated to the following field name.
Has anyone else seen this before, and if so, how do you get
around it? Let me know if you need more details.
Thanks in advance.
Tim
nullThat worked. Thanks!
Peter Kls (guest) wrote:
: Timothy Sim (guest) wrote:
: : Hi,
: : I am trying to retrieve the names of select fields through
the
: : OCI using OCIParamGet() followed by OCIAttrGet(). This seems
to
: : work OK, in most cases, except occasionally I get one field
: name
: : concatenated to the following field name.
: Try evaluating the string length returned by the OCIAttrGet
call.
: The name string is not (always) \nul terminated.
: : Thanks in advance.
: : Tim
: good luck
: Peter
null -
CharacterSeparatedValuesFormatOptions and Problems with a Number field
I want to export a report in a comma separated type format using CharacterSeparatedValuesFormatOptions. I set the Delimiter option to "" because I don't want the quotes around the fields. The problem is if the report contains a number field that contains a comma. For example if my data is:
abc 7,459.84 xyz
The data exported looks like:
abc,7,459.84,xyz
Is there a way to eliminate the comma from the number data during the export, otherwise it looks like I have an extra field?Before you try getting this working in your application, you need to try it in the Crystal Reports Designer. If you export from the designer setting the Separated Values Export Options dialog, are you able to get the export you are looking for?
If not, then it will not be possible to achieve the export at runtime either.
Regards,
Jonathan -
Sql Problems, Same Field Names In Multiple Mysql Tables?
I have a keyword search that searches multiple DB tables for thumbnail images using UNION ALL. I have two pages, results.php, and view.php. My goal is to able to click a thumbnail image on results.php and be directed to a larger version of that same image on view.php. The problem is each image in all my tables uses the field name "id" so when I click a thumbnail on results.php I get two different images with the same id from different tables. I tried changing the id's to different names, but when it was time to pass url parameters I can only choose 1 value. (if you can choose more than 1 I don't know how). So my question is why are my id's from different tables being grouped together, and how can I change this?
Image Results Page (which works perfect):
SELECT *
FROM table1
WHERE keyword LIKE %colname% OR id LIKE %colname%
UNION ALL
SELECT *
FROM table2
WHERE keyword LIKE %colname% OR id LIKE %colname%
View Image Page (having problems here):
SELECT *
FROM table1
WHERE id = colname
UNION ALL
FROM table2
WHERE id = colnameYes, that is going to be a problem - and it's just the beginning of your problems when you do not normalize your data. Your data model is not correct. You should not be storing similar data in 15 tables - it's a really big mistake.
To solve your current problem you would need to include a table identifier in the query results in the Image results page, and pass that to the view page and then use PHP to dynamically create the SQL with the correct table....ugh! -
Problems with the number three on the keypad
iphone 4: When I dial a phone number, all of the digits on the keypad work correctly. When prompted to enter an account number or PIN, or choose an option from a menu after I get connected to my party, the number three key often does not register. I thought I might have dropped the phone or something so I tried my wife's iphone 4 and it has the same problem as mine with the number three. Is there a "fix" or workaround for this and am I the only one with this problem?
But this is all me, and I do A LOT of scrolling back and forth to cross check facts and so on. Having to constantly switch between files would be a huge pain.
I guess it's a matter of work styles, but I'd much prefer to switch around among a batch of open chapters with a simple key combination, as opposed to scrolling back and forth through pages in linear fashion.
How would ID handle a document of this complexity?
With the limited information you've offered, I'd say I have experience with similar documents, (product catalogs/pricelists), that ID handled just fine, and other cases in which seemingly simple files choked it. I can say the same of Quark. No one can answer your question definitively; there are too many variables. Chances are it's not (only) the size and complexity of your document in itself that are causing your problems. There can be any number of hardware or OS issues contributing, to name a couple. -
Problem with Serial Number from MSi ATi HD4870 :/
Hi all,
I have problem with my HD4870. I lost the serial number (the small paper on back of card) from card. Have I any chance to get it back? I can take a photo and post it here some S/N and P/N from card, if it helpfull... I lose my warranty, if I can't get it back
So, any choice to get it?
Thanks for answers,
Mirek.Thanks for answers in first,
I have problem with card - I had it two days in Crossfire with another HD4870 but accidentally when I played Metro 2033 I got some stripes on monitor (purple, blue) and then PC stop working. I had to restart PC and when the system booted to Windows, until 10 second I got the same stripes on monitor. Then my PC didn't boot.
On my card I have 4 diodes - when I turned on pc, the diodes blinks but now blinks only TREE of FOUR diods.. So I took the card to shop when I bought it, but the shop-assistant told me, that I need this little paper on Card.. :/
I'm from Czech Republic, so I have a little problem with directly contact to HQ of MSI
So I have to go again to the shop and tell them, that Serial Numbers what they need are in card? -
Problem with serial number and installing PSE 12
I purchased Adobe PSE 12 yesterday and the purchase went through. But I never received a confoirmation email from Adobe. Now, when I try to enter the serial number to install, I'm told there is a problem with the serial number and I must contact customer support. Can't get through to customer support though. What should I do? I desperately need to get this program installed. Thanks.
Hi 2Summers,
Please provide me the serial number and I will check it for you.
Send me aprivate message. Do not post it here.
If you dont know how to do that refer : http://forums.adobe.com/thread/1184148 -
Problem with serial Number in Inspection Lot
Dear All,
I have a typical problem that material is there in quality inspection lot and serial numbers are aslo assigned during 101 mvt. but when I am posting it to unrestricted stock system is not determine serial number and giving an error
*Stock data of serial number XXXXXX not suitable for movement
Message no. IO231*
All configuration setting are also OK as this problem comes for the first time and previously we were able to clear inspection lots of that material easily with serial number.
Any Idea to rectify that problem?
Thanks
Edited by: Ashu on Aug 9, 2010 5:54 PMHello,
Check with your serializing Procedure check the assignment in Work scheduling View for this material also check in Quality view
for inspection type 4 for GR of Production order.
Regards,
JayaVimal -
Problem with random number generation
hey forum, i wonder if anyone can help me out with a small problem with my university coursework (yep its homework!!!)
heres my problem, i am writing one of them 8 puzzle problems (the one based around sam lloyds 15 puzzler), i can successfully generate one random sequence of numbers with no duplicates, but whenever i call the random method again it keeps producing the same results
heres the code
in my main class file
if(e.getSource() == randomButton) {
new RandomPuzzle();
System.out.println(random.randState);
//startStateString = new RandomPuzzle();
}heres my number generator class file
import java.util.Random;
import java.io.*;
public class RandomPuzzle
/** Base Random number generator */
Random rn = new Random();
/** Puzzle holder */
byte b[];
long number = 0;
String randState = "";
/** Default constructor */
public RandomPuzzle() {
rn.setSeed(number);
b = new byte[9];
randState = randomString();
/** Provide range for generation */
public int rand(int lo, int hi) {
int n = hi - lo + 1;
int i = rn.nextInt() % n;
if (i < 0)
i = -i;
return lo + i;
/** Set size for array */
public int rand( int hi){
int n = hi;
return n;
/** Check for duplicate values within the same configuration */
boolean valueExists( byte value ) {
int i = b.length;
boolean exists = false;
for( int j = 0; j < i; j++ ){
if( b[j] == value )
exists = true;
return exists;
/** returns the actual string */
public String randomString(int lo, int hi) {
int n = rand( 9 );
//boolean valueEntered = false;
for (int i = 0; i < 9; i++) {
boolean valueEntered = false;
byte temp = (byte)rand('0', '8');
while( valueEntered == false ) {
if( !valueExists( temp ) ) {
b[i] = temp;
valueEntered = true;
else
temp = (byte)rand('0', '8');
return new String(b, 0);
/** calls above function */
public String randomString() {
return randomString(0, 8);
}i've tried for hours to work this out, but i am stumped. if anyone can point me in the right direction, maybe point out the problem code and give one or two tips i would be forever in your debt
thanx in advance
korbitzthanx for the help paulcw, but when i removed the seed code it done the same
but i added this to my main class and now it works fine
if(e.getSource() == randomButton) {
RandomPuzzle temp = new RandomPuzzle();
System.out.println(temp.randState);
//startStateString = new RandomPuzzle();
}thanx again for your help -
Packing instructions - problem with external number range
Hi Gurus:
I have a problem with configuring packing instructions. I have created a number range entry with external numbering (tx. OPIN), but when I want to create a new packing instruction in POP1, I get an error message: Manually-entered packing instruction ID cannot be checked (Message no. VHU01116). Can you please tell me how to avoid this error message?
The system works fine if the number range is set to internal. As a matter of fact, initially I did create a setting with internal numbering and conducted a couple of tests, but I had to change the "external" flag in the number range to meet business requirements. Is it possible that somehow the system does not recognize that I have changed the flag and I need to run some generation program or something similar?
I appreciate your valuable input
TamasFor further records:
we have found the problem after debugging the function. In order for the system to accept the external number range, a second number range object with ID 02 must be maintained in OPIN. Then you can use this number range as external and keep the first as internal. -
Is there any people in skype to help out this issue, give some response please its very important, i gave all my coleogues my skype number so i cant able to contact them..i wish you will sort out this problem as soon as possible...
thank you
Subject/title amended from "fault," for clarity.
thasriqHi, Thasriq, and welcome to the Community,
Please check the information presented in this FAQ article to see if this does not resolve problems with your SKype Number not receiving calls:
https://support.skype.com/en/faq/FA10615/why-am-i-not-receiving-calls-to-my-skype-number
If these steps do not work, please contact Skype Customer Service directly for further assistance in testing the number.
Regards,
Elaine
Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often! -
What is the field name for item serial number
hi all
i am doing dispatch report .... i need field name and table name for [item serial number (min) from batch number of that delivery material,item serial number (max) from batch number of that delivery material] ... actually this was the exact term given in the spec. can any one help me out
regards
aswinsome more tables :
SER00 .. SER08 , or type SER* in SE11 and press F4, you will get some more.
and <a href="http://www.erpgenie.com/sap/sapfunc/serialnumbers.htm">Check this</a>
Maybe you are looking for
-
Output Module (Bridge CC) not working on Mac
As suggested here http://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html I downloaded and tried to install the Bridge CC Output Module. I could not find the "Bridge CC Extensions" folder only "Bridge CC" I can see the output name insid
-
Getting files transferred from my PC to MacBook Pro
I have a fairly new PC and bought a MacBook Pro because I'm returning to school end of august. I have lots of files on my PC that I would love to use on my laptop. How can I connect both and access and copy these files to my laptop? Both have wi-f
-
hi friends Here is my query in Workflow I would like to know when a work item gets triggered.? I know that its a run time object,but i want to know is there any such condition which must satisfy before any work item gets triggered,or is there any pro
-
I lost my print spooler after running mulitple anti-malware programs. How do i reload? Thanks.
-
Should i send my curve 8320 back?
i watched the video on inserting media cards and my bb does not have a little lid on it with lock unlock written on it- the sim card slot does but not where the media card should go - did i get a duff one?