Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Frequently Asked Questions
 FAQ Addition Requests
 String or binary data would be truncated

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
slemieux Posted - 22 November 2000 : 18:00:03
I assume this is a known issue here at forum.snitz.com

Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.
/forum/post_info.asp, line 625

when posting a lengthy reply

Or is it a built in cut off to keep us from blabbing away

Scott LeMieux

[moved by admin on 01/06/2001]<
15   L A T E S T    R E P L I E S    (Newest First)
Reinsnitz Posted - 05 January 2001 : 14:40:06
Considering this a feature of the Database in question/Hardware the DB is running on as opposed to a forum related issue.

Closing This and it's sibling topic at: http://forum.snitz.com/forum/link.asp?TOPIC_ID=1518 also, I'm moving this topic to the FAQ forum for Heptite to note in her work there.

Reinsnitz (Mike)
><)))'>
"The glory of young men is their strength, and the honor of old men is their gray hair." - Proverbs 20:29
<
HuwR Posted - 15 December 2000 : 15:52:15
I don't use it, I was hust testing some install scripts for the Mods,
so I figured I would test the whole site.

'Resistance is futile'<
tilttek Posted - 15 December 2000 : 15:32:20
I didn't have the time to look at it... I know there are some problems with ADO (it's documented on MySQL site), but it's not our problem. Are you using MySQL (I don't remember if it install its self with MySQL for Window)?

I hope to have time to look at it this week end. But I'm not sur. I wont be at home very often.


Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com<
HuwR Posted - 15 December 2000 : 09:39:16
tiltek,

did you manage to find out why I was getting the error on MYSQL ?

'Resistance is futile'<
tilttek Posted - 15 December 2000 : 09:28:09
quote:

According to IIS

To optimize performance, avoid using the ADO record addition and deletion methods, such as AddNew and Delete. If your application adds and deletes records intensively, your application will perform better if it uses direct SQL statements, such as INSERT.




Good thing to know... But I think they mean More that 1 Record at once.


Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com<
HuwR Posted - 15 December 2000 : 06:10:03
According to IIS

To optimize performance, avoid using the ADO record addition and deletion methods, such as AddNew and Delete. If your application adds and deletes records intensively, your application will perform better if it uses direct SQL statements, such as INSERT.

'Resistance is futile'<
tilttek Posted - 11 December 2000 : 08:57:54
quote:

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = strConnString
objConn.Open


'Resistance is futile'



In objRS2.Open "FORUM_ONLINE", objConn, 1, 2, 2
change it for objRS2.Open "FORUM_ONLINE", strConnString, 1, 2, 2

I don't have my code here, nor my book, so I can't validate... I'm at work in Java...
But looking at the code I did send, this might do the trick. I'll try to retest this...



Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com<
HuwR Posted - 10 December 2000 : 12:36:14
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = strConnString
objConn.Open


'Resistance is futile'<
tilttek Posted - 10 December 2000 : 12:18:37
quote:


This doesn't appear to work in mysql.
In the who's online mod, in onine2.asp, is the following code

if rsWho.eof or rsWho.bof then

Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open "FORUM_ONLINE", objConn, 1, 2, 2
objRS2.AddNew
objRS2("UserID") = User
objRS2("Status") = "LOGIN"
objRS2("DateCreated") = fDate
objRS2("CheckedIn") = CheckInTime
objRS2("M_BROWSE") = Location
objRS2.Update
objRS2.close
else
strSql = "UPDATE FORUM_ONLINE SET M_BROWSE = '" & Location & "' , DateCreated = '" & fDate & "' WHERE UserID = '" & User & "'"
my_Conn.Execute (strSql)
end if


Using mysql it fails with the following error
3219 | Operation is not allowed in this context.

if you change the code to

if rsWho.eof or rsWho.bof then
on error resume next
Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSQL = "INSERT INTO " & strTablePrefix & "ONLINE ( UserID,Status,DateCreated,CheckedIn,M_BROWSE) VALUES ("
strSql = strSQL & User & ",'LOGIN','" & fDate & "','" & CheckInTime & "','" & Location & "')"
my_Conn.Execute (strSql)
if err.number <> 0 then response.write err.number & "|" & err.description
else
strSql = "UPDATE FORUM_ONLINE SET M_BROWSE = '" & Location & "' , DateCreated = '" & fDate & "' WHERE UserID = '" & User & "'"
my_Conn.Execute (strSql)
end if

everything works OK.




I did look at you code closely and sould work. What's objConn?


Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com<
Doug G Posted - 09 December 2000 : 16:02:23
quote:
Since I have never had this problem anywhere else I am betting it's this server with the issue (not that it couldn't be others). The two things that are typically screwy are MDAC and ODBC. And while I would almost always bet the farm on MDAC, I searched the knowledge base and found this

When I read this article, it sounded like an explanation of why you might receive an error message using ODBC vs. ISQL, not what the error message actually was.

I don't find much info on 80040e57 either, though.

======
Doug G
======

Edited by - Doug G on 09 December 2000 16:03:23<
HuwR Posted - 09 December 2000 : 14:44:19
quote:

Here some tip: use:

Dim objRecordset
Set objRecordset = Server.CreateObject("ADODB.Recordset")
' data in the table.
objRecordset.Open "TableName",DB_CONNECTIONSTRING,adOpenKeyset,adLockPessimistic,adCmdText
objRecordset.AddNew
objRecordset.Fields("text_field") = CStr(WeekdayName(WeekDay(Date())))
objRecordset.Fields("integer_field") = CInt(Day(Now()))
objRecordset.Fields("date_time_field") = Now()
objRecordset.Update
' Get the DB assigned ID of the record we just added.
iRecordAdded = objRecordset.Fields("id").Value
objRecordset.Close
Set objRecordset = Nothing



This doesn't appear to work in mysql.
In the who's online mod, in onine2.asp, is the following code

if rsWho.eof or rsWho.bof then

Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open "FORUM_ONLINE", objConn, 1, 2, 2
objRS2.AddNew
objRS2("UserID") = User
objRS2("Status") = "LOGIN"
objRS2("DateCreated") = fDate
objRS2("CheckedIn") = CheckInTime
objRS2("M_BROWSE") = Location
objRS2.Update
objRS2.close
else
strSql = "UPDATE FORUM_ONLINE SET M_BROWSE = '" & Location & "' , DateCreated = '" & fDate & "' WHERE UserID = '" & User & "'"
my_Conn.Execute (strSql)
end if


Using mysql it fails with the following error
3219 | Operation is not allowed in this context.

if you change the code to

if rsWho.eof or rsWho.bof then
on error resume next
Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSQL = "INSERT INTO " & strTablePrefix & "ONLINE ( UserID,Status,DateCreated,CheckedIn,M_BROWSE) VALUES ("
strSql = strSQL & User & ",'LOGIN','" & fDate & "','" & CheckInTime & "','" & Location & "')"
my_Conn.Execute (strSql)
if err.number <> 0 then response.write err.number & "|" & err.description
else
strSql = "UPDATE FORUM_ONLINE SET M_BROWSE = '" & Location & "' , DateCreated = '" & fDate & "' WHERE UserID = '" & User & "'"
my_Conn.Execute (strSql)
end if

everything works OK.



'Resistance is futile'<
work mule Posted - 09 December 2000 : 13:39:39
quote:
Since I have never had this problem anywhere else I am betting it's this server with the issue


I tried to taking the same information that I tried to post on Snitz and posted it on my development forum at home. It posted with no problem. On here (Snitz) I received the error that I posted earlier in this topic.



<
HuwR Posted - 08 December 2000 : 22:25:02
Thanks MS, that's a really useful article.

'Resistance is futile'<
slemieux Posted - 08 December 2000 : 21:40:11
Think MS will ever have a useful site where real people can find real answers?

Since I have never had this problem anywhere else I am betting it's this server with the issue (not that it couldn't be others). The two things that are typically screwy are MDAC and ODBC. And while I would almost always bet the farm on MDAC, I searched the knowledge base and found this

So if this forum isn't using ODBC, then I just wasted a bunch of bandwidth

As far as MySQL it's been a couple months since I worked with it, but it is 100% ANSI SQL compliant, so the instert statement shouldn't be a problem. MySQL supports recordsets but last I checked didn't support any type of locking or cursor location.

Anyone simply tried changing the way this forum connects to the database? I use SQLOLEDB without any problems.

Scott LeMieux<
HuwR Posted - 08 December 2000 : 20:09:00
Hmmm,

We need more info from people with this problem.
I have just succesfully posted > 60000 chars against both my
SQL and Access DB's using the forum?

I'm sure it didn't work before.

Anyway, my version of ADO is 2.5

'Resistance is futile'

I just installed MySQL on by home server, and successfully posted the same message to the MySQL DB.

I would therfore summise it is not a problem with the forum code, but a driver specific problem.

Edited by - huwr on 08 December 2000 21:26:23<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07