I've got a database that's been in production for two years. This issue has never come up before. I have made no changes to any code or tables affected by any of this.
In code I have the following:
strSql = "INSERT INTO TblMemoRecipient (ActionID, " _
& "EmployeeID, DiscrepancyID, CC, MemoCycle) " _
& "VALUES (" & lngActionID & ", " & rst2!EmployeeID & ", "
& lngDiscrepancyID & ", " & rst2!CC _
& ", " & intMemoCycle & "
"
debug.print strSql
Call db.Execute(strSql, dbFailOnError)
The results of the debug are this:
INSERT INTO TblMemoRecipient (ActionID, EmployeeID, DiscrepancyID, CC, MemoCycle) VALUES (93301, 2, 44561, False, 1)
The execute give me this error:
Error 3163: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
Here's a description of tblMemoRecipient:
FieldName Type Size
ActionID Long Integer 4
EmployeeID Long Integer 4
DiscrepancyID Long Integer 4
CC Yes/No 1
MemoCycle Long Integer 4
If I copy the SQL into the SQL view of a new query, I get the same error.
If I create a new record I can use values much bigger than those in the SQL statement in each of the Long Integer fields without a problem.
I have compacted and repaired the back end.
I have checked through archives here and at comp.databases.ms-access and found nothing that directly applies to this situation--all of the examples I saw involved the fields actually being too small.
Help files tell me I should be able to get numbers over 2 billion in these fields.
Any help would be very welcome.
Jeremy
PS: Maybe size is an issue, and I've just been deluding myself. I certainly would be happy to be wrong about this.
==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
In code I have the following:
strSql = "INSERT INTO TblMemoRecipient (ActionID, " _
& "EmployeeID, DiscrepancyID, CC, MemoCycle) " _
& "VALUES (" & lngActionID & ", " & rst2!EmployeeID & ", "
& lngDiscrepancyID & ", " & rst2!CC _
& ", " & intMemoCycle & "
debug.print strSql
Call db.Execute(strSql, dbFailOnError)
The results of the debug are this:
INSERT INTO TblMemoRecipient (ActionID, EmployeeID, DiscrepancyID, CC, MemoCycle) VALUES (93301, 2, 44561, False, 1)
The execute give me this error:
Error 3163: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
Here's a description of tblMemoRecipient:
FieldName Type Size
ActionID Long Integer 4
EmployeeID Long Integer 4
DiscrepancyID Long Integer 4
CC Yes/No 1
MemoCycle Long Integer 4
If I copy the SQL into the SQL view of a new query, I get the same error.
If I create a new record I can use values much bigger than those in the SQL statement in each of the Long Integer fields without a problem.
I have compacted and repaired the back end.
I have checked through archives here and at comp.databases.ms-access and found nothing that directly applies to this situation--all of the examples I saw involved the fields actually being too small.
Help files tell me I should be able to get numbers over 2 billion in these fields.
Any help would be very welcome.
Jeremy
PS: Maybe size is an issue, and I've just been deluding myself. I certainly would be happy to be wrong about this.
==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.