Ask a Question related to Coldfusion Database Access, Design and Development.
-
canswim #1
Field Length Help
I added a new field to my database:
<CFQUERY NAME="addColumn" DATASOURCE="#APPLICATION.dsn#"
USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
ALTER TABLE users
ADD user_info varchar(1000);
</CFQUERY>
Then I tried to add data to the field in the databse:
<CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
UPDATE users
SET
user_info = "Robert has over 10 years experience in the trade show and
marketing industries. His expertise and experience in these areas, produces an
advantageous relationship for our clients. Due to his knowledge of the area
Robert understands the delicate intricacies that need to be managed and
fulfilled to execute an effective and efficient campaign. Robert's passion for
perfection in all projects ensures our clients, the best elements of each
aspect of a new marketing project. His experience and knowledge is passed on to
the client by his ability to recognize the advantages and disadvantages of
marketing techniques/resources, from products to sales personnel
personalities."
WHERE user_ID = 11
</CFQUERY>
But when I do I get this error message:
-------------------------------------------------------------
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]The identifier that starts with
'Robert has over 10 years experience in the trade show and marketing
industries. His expertise and experience in these areas, pro' is too long.
Maximum length is 128.
The error occurred in
\\10.0.0.112\boxinc.ca\public\admin2112\scripts\up dateUsers.cfm: line 30
28 : </CFIF>
29 :
30 : <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
31 : UPDATE users
32 : SET
--------------------------------------------------------------------------------
SQL UPDATE users SET user_info = "Robert has over 10 years experience in
the trade show and marketing industries. His expertise and experience in these
areas, produces an advantageous relationship for our clients. Due to his
knowledge of the area Robert understands the delicate intricacies that need to
be managed and fulfilled to execute an effective and efficient campaign.
Robert's passion for perfection in all projects ensures our clients, the best
elements of each aspect of a new marketing project. His experience and
knowledge is passed on to the client by his ability to recognize the advantages
and disadvantages of marketing techniques/resources, from products to sales
personnel personalities." WHERE user_ID = 11
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]The identifier that starts with
'Robert has over 10 years experience in the trade show and marketing
industries. His expertise and experience in these areas, pro' is too long.
Maximum length is 128.
The error occurred in
\\10.0.0.112\boxinc.ca\public\admin2112\scripts\up dateUsers.cfm: line 30
28 : </CFIF>
29 :
30 : <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
31 : UPDATE users
32 : SET
--------------------------------------------------------------------------------
SQL UPDATE users SET user_info = "Robert has over 10 years experience in
the trade show and marketing industries. His expertise and experience in these
areas, produces an advantageous relationship for our clients. Due to his
knowledge of the area Robert understands the delicate intricacies that need to
be managed and fulfilled to execute an effective and efficient campaign.
Robert's passion for perfection in all projects ensures our clients, the best
elements of each aspect of a new marketing project. His experience and
knowledge is passed on to the client by his ability to recognize the advantages
and disadvantages of marketing techniques/resources, from products to sales
personnel personalities." WHERE user_ID = 11
DATASOURCE boxinc_boxinc_ca
VENDORERRORCODE 103
SQLSTATE HY000
-------------------------------------------------------------
Please help! Why does it tell me the max length is 128 when i specified
varchar(1000)?
canswim Guest
-
Length cannot be less than zero. Parameter name: length
I receive the following error when I try to run this asp.net 1.1 app: Length cannot be less than zero. Parameter name: length Description: An... -
Query exists? Get size / length of field
I'm wondering if there is any way to have SQL return fields and automatically include the field size. It's such a pain to do manutally, it would... -
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed... -
How to get length of string? length() problems
Simplified a bit, I'm parsing HTML documents to get sentences e.g. my $html = get($URL); # remove all HTML TAGs...blah blah blah @sentences =... -
Field length
I would like to be able to set a field so you can not enter more than a preset number of characters.... What would the calculation be to make it... -
paross1 #2
Re: Field Length Help
First of all, you are surrounding your text with double quotes. Also, I noticed that you have a single quote in the middle of your text (Robert's passion ).
Phil
paross1 Guest
-
canswim #3
Re: Field Length Help
yes that was it, thanks Robert i figured it out once i went back and looked at it again..I hate wasting time on such silly mistakes.
Mike
canswim Guest



Reply With Quote

