Click here to Skip to main content
15,904,023 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: components of webservices Pin
Christian Graus15-May-05 18:19
protectorChristian Graus15-May-05 18:19 
GeneralJavascript Object not Found error Pin
MylesOtter11-May-05 9:49
MylesOtter11-May-05 9:49 
GeneralRe: Javascript Object not Found error Pin
sprout7423-May-05 3:36
sprout7423-May-05 3:36 
GeneralSQL Injection Attacks Pin
Brendan Vogt10-May-05 20:21
Brendan Vogt10-May-05 20:21 
GeneralRe: SQL Injection Attacks Pin
Michael P Butler10-May-05 21:04
Michael P Butler10-May-05 21:04 
GeneralRe: SQL Injection Attacks Pin
Brendan Vogt10-May-05 21:12
Brendan Vogt10-May-05 21:12 
GeneralRe: SQL Injection Attacks Pin
Colin Angus Mackay12-May-05 4:44
Colin Angus Mackay12-May-05 4:44 
GeneralCreateParameter Length Value Pin
Brendan Vogt10-May-05 20:19
Brendan Vogt10-May-05 20:19 
Hi there,

I am struggling with a piece ofcode. I am using using classic ASP (which is the normal ASP,and not ASP.NET). I am using SQL Server 2000 as the database. I am using stored procedures.

I am using the command object when adding data to the database. My code looks like this:

objCmd.Parameters.Append objCmd.CreateParameter("@ContactCommQues", adWChar,
adParamInput, 16, Request.Form("txtQuesComments"))

txtQuesComments is a input control. The value 16 in the CreateParameter method I took because when you define a field with the ntext datatype, it automatically inserts a 16 for the size of that field. OK, coming back to the CreateParameter method, the value 16 represents the size, and the MSDN library defines this field as "A Long value that specifies the
maximum length for the parameter value in characters or bytes". Now the problem is that I do not know what the length of the <textarea> will be, it might be a long letter or article, maybe it can be 10000 characters long. Do you know how I can solve this? What I thought wasmaybe I should replace value 16 with something like Len(Request.Form("txtQuesComments")). This seems to work, but is this the only way?

Here is a shortened version of my stored procedure:

CREATE Procedure sp_InsertContact
(
@ContactCommQues ntext
)

AS

INSERT INTO tblContact
(
ContactCommQues
)
VALUES
(
@ContactCommQues
)
GO

Thanks
GeneralRegular expressions Pin
Brendan Vogt10-May-05 20:16
Brendan Vogt10-May-05 20:16 
GeneralRe: Regular expressions Pin
MylesOtter11-May-05 10:14
MylesOtter11-May-05 10:14 
GeneralPHP AND JavaScript Pin
progman10-May-05 11:55
progman10-May-05 11:55 
GeneralRe: PHP AND JavaScript Pin
abhi_code11-May-05 2:11
abhi_code11-May-05 2:11 
QuestionSyntax coloring in HTML ? Pin
borax710-May-05 10:51
borax710-May-05 10:51 
GeneralQuick Problem Pin
TofuBug2410-May-05 7:43
TofuBug2410-May-05 7:43 
Generalweb site search problem Pin
Khyati Asher10-May-05 3:34
Khyati Asher10-May-05 3:34 
GeneralRe: web site search problem Pin
markkuk10-May-05 11:37
markkuk10-May-05 11:37 
GeneralReg Ex question. Pin
theJazzyBrain9-May-05 22:14
theJazzyBrain9-May-05 22:14 
GeneralJavascript Form Function Help Needed Pin
angelina_jolie9-May-05 20:37
angelina_jolie9-May-05 20:37 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 20:59
Yulianto.9-May-05 20:59 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 21:08
angelina_jolie9-May-05 21:08 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 21:14
Yulianto.9-May-05 21:14 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 21:53
angelina_jolie9-May-05 21:53 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 22:08
Yulianto.9-May-05 22:08 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 22:11
angelina_jolie9-May-05 22:11 
GeneralRe: Javascript Form Function Help Needed Pin
DavidNohejl10-May-05 0:01
DavidNohejl10-May-05 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.