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!
T O P I C R E V I E W
Carefree
Posted - 16 June 2008 : 14:25:42 Anybody want to take a stab at this one? Here's the error message.
Microsoft JET Database Engine error '80040e57'
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
/itw/admin_post_limits.asp, line 96
Here are the lines involved:
if Request.Form("Method_Type") = "Limit" and _
Request.Form("MEMBER_ID") <> "" and IsNumeric(Request.Form("MEMBER_ID")) = true and _
Request.Form("POST_LIMIT") <> "" AND IsNumeric(Request.Form("POST_LIMIT")) = true then
if mid(NOW,10,1) < "9" then
strPDT = left(NOW,9)
else
strPDT = left(NOW,10)
end if
strSql = "INSERT INTO " & strTablePrefix & "POST_LIMITS (MEMBER_ID, POST_LIMIT, POST_DATE, POSTS_TODAY) VALUES (" & FMID & ", " & FMPL & ", " & strPDT & ", 0);"
set rsPLimits=my_Conn.execute(strSql)
if not rsPLimits.EOF or not rsPLimits.BOF then 'Member already on limit list
And here's the output of the sql:
INSERT INTO FORUM_POST_LIMITS (MEMBER_ID, POST_LIMIT, POST_DATE, POSTS_TODAY) VALUES (2, 1, 6/16/2008, 0);
Length of 'Member_ID'=1
Length of 'Post_Limit'=1
Length of 'Post_Date'=9
The fields are set as long integer for all but the date, it's set to 15 characters but will never exceed 11. <
6 L A T E S T R E P L I E S (Newest First)
ruirib
Posted - 16 June 2008 : 17:41:57
quote:Originally posted by Andy Humm
Carefree, come on, get in the corner and put that hat on... No seriously, we all have our forgetful moments and mine is right now! How do you get to show the output of the sql?
A Response.Write followed by a Response.End .<
Andy Humm
Posted - 16 June 2008 : 17:14:50 Carefree, come on, get in the corner and put that hat on... No seriously, we all have our forgetful moments and mine is right now! How do you get to show the output of the sql?<
ruirib
Posted - 16 June 2008 : 14:38:07<
Carefree
Posted - 16 June 2008 : 14:34:20 Duhhhhhhhhhhhhhhhhhhhhhhh
I feel like the world's biggest dunce. The silly thing is DIVIDING the date.....<
Carefree
Posted - 16 June 2008 : 14:32:42 I'll try setting it that way, but why would that result in a "field size too small" message?<
ruirib
Posted - 16 June 2008 : 14:28:16 The date value is wrong. For Access, it should be #2008-06-16#, if the field is of the date type.<