Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Sql Issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 16 June 2008 :  14:25:42  Show Profile  Reply with Quote
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.
<

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 16 June 2008 :  14:28:16  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
The date value is wrong. For Access, it should be #2008-06-16#, if the field is of the date type.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 16 June 2008 :  14:32:42  Show Profile  Reply with Quote
I'll try setting it that way, but why would that result in a "field size too small" message?<
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 16 June 2008 :  14:34:20  Show Profile  Reply with Quote
Duhhhhhhhhhhhhhhhhhhhhhhh

I feel like the world's biggest dunce. The silly thing is DIVIDING the date.....<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 16 June 2008 :  14:38:07  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 16 June 2008 :  17:14:50  Show Profile  Reply with Quote
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?<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 16 June 2008 :  17:41:57  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
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 .<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07