close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Truncated error

Thread began 1/13/2011 2:25 am by keith505 | Last modified 1/13/2011 3:55 pm by Jason Byrnes | 829 views | 3 replies |

keith505

Truncated error

I have a text fileld that will allow for long entries... the field is a varchar(MAX) SQL Server 2008. But, if the entry is more than approximately 4K or 5K, I get the SQL error that "String or binary data would be truncated"... but strangely enough, the entire thing is written to the database. After some investigating of the error line, the problem is with these three lines...

WA_AppBuilderRecordset.Open()
if (NOT WA_AppBuilderRecordset.EOF) then Session(WA_sessionName)
=WA_AppBuilderRecordset.Fields.Item(WA_indexField).Value
WA_AppBuilderRecordset.Close()

If I comment them out, the extension works normally without an error. Any idea why these 3 lines would choke on a long entry?

Sign in to reply to this post

Jason ByrnesWebAssist

Those three lines are looking up the record that was just created to get the ID and store it in a session variable.

so it sounds like the data being truncated is the binary field in the lookup recordset.

it may work to edit these three line:
WA_AppBuilderRecordset.Open()
if (NOT WA_AppBuilderRecordset.EOF) then Session(WA_sessionName)
=WA_AppBuilderRecordset.Fields.Item(WA_indexField) .Value
WA_AppBuilderRecordset.Close()

to:
On Error resume Next
WA_AppBuilderRecordset.Open()
if (NOT WA_AppBuilderRecordset.EOF) then Session(WA_sessionName)
=WA_AppBuilderRecordset.Fields.Item(WA_indexField) .Value
WA_AppBuilderRecordset.Close()


but i dont think the session variable would be created doing this.

Sign in to reply to this post

keith505

I think that would have the same results as just commenting out the lines. Either way, for this form, the session variable isn't needed anyway, and I don't usually have forms that submit ridiculously large amount of information.

Thanks,

Brian

Sign in to reply to this post

Jason ByrnesWebAssist

OK, if you dont need the session in this case, then commenting those lines or setting the On Error Resume Next should do the trick for you.

Sign in to reply to this post

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...