close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding a link in iRite box won't insert into ntext field?

Thread began 11/23/2010 9:10 am by Nathon Jones Web Design | Last modified 11/30/2010 12:27 pm by Jason Byrnes | 2116 views | 17 replies |

Nathon Jones Web Design

Adding a link in iRite box won't insert into ntext field?

Hi. I've got a standard textarea field which I converted to an iRite box to allow some basic formatting to be done.

Problem is when a user adds a hyperlink in the field, using the hyperlink toolbar command in iRite, and then tries to to submit it to our database we get the following error:

ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.

The textarea/iRite field is attempting to submit to an ntext field in the database.
If I remove the link, it submits fine so there is something about adding the link that causes the error.

Any ideas? Much appreciated.
Thank you.
Nath.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so I can examine the code.

Sign in to reply to this post

Nathon Jones Web Design

attached

Thanks Jason. That's attached now for you.

Any joy?

Attached Files
iRiteLinkProblem.zip
Sign in to reply to this post

Nathon Jones Web Design

any joy?

Any success with that Jason? Has me stumped. It submits fine when I remove the link!

Sign in to reply to this post

Jason ByrnesWebAssist

try changing the following line:

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("NCnews")) ' adVarWChar




to:

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 500, Request.Form("NCnews")) ' adVarWChar
Sign in to reply to this post

Nathon Jones Web Design

character length?

Hi Jason. Is that value the length of characters that are allowed?

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is the character length for the parameter.

Sign in to reply to this post

Nathon Jones Web Design

But it's an ntext field. I need to allow for an unknown amount of characters.
Why is adding something simple, like a hyperlink, causing this problem? I've never had to set the character length for an ntext field before.

Sign in to reply to this post

Jason ByrnesWebAssist

the Dreamweaver insert record behavior will not be configured to allow for an unknown number of characters since it uses parameters in the query. One of the arguments that MUST be passed to the parameter is maximum length. This has nothing to do with the DB Column, it is a restriction to the ADO Parameter.


You can either set the parameter to use a very large max character setting:

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 5000, Request.Form("NCnews")) ' adVarWChar


or change to using the data assist insert record behavior which does not use parameters.

Sign in to reply to this post

Nathon Jones Web Design

?

Why have I never encountered that before? I've created many INSERT and UPDATE commands that insert to, or update, an ntext field and I've never experienced this problem.

Also, as I've mentioned, this only happens when I use the "Insert Hyperlink" option in iRite. If I remove the link, I don't have to specify the number of characters in the parameter and I can insert/update any number of characters into the ntext field.

I'm certain the problem relates, in some way, to the insert link option in iRite.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...