I have an access database with about a dozen tables which is created programmatically.
each of these tables contains several text fields, as I am only putting small amounts of text in these fields I originally defined them as CHAR (which shows up as "short text" in the access editor).
However, when the code runs I get an error saying "record too large" which seems baffling because if I go back and define them as MEMO (which shows up as "long text" in the access editor), it compiles and runs without problem. After the fact, I can go into the access editor and change them all to short text with no complaints, but I need to do this via my code. Can anyone shed some light on this?
Thanks
here is an example of one of the tables:
Try
sql = "CREATE TABLE Wires " _
& "(WireID memo Not NULL CONSTRAINT PRIMARYKEY PRIMARY KEY, " _
& "CableID int, " _
& "WireDefID int, " _
& "SheetID int, " _
& "DocumentID int, " _
& "SheetName Memo, " _
& "WireLength Double, " _
& "Valid YesNo Not NULL, " _
& "Existing YesNo Not NULL, " _
& "Reference YesNo Not NULL, " _
& "Stowed YesNo Not NULL, " _
& "WireName Memo, " _
& "WireDescription Memo, " _
& "WireSignal Memo, " _
& "ShapeName Memo Not NULL, " _
& "DesignatorPrefix Memo Not NULL, " _
& "Designator Memo Not NULL, " _
& "DesignatorSuffix Memo Not NULL, " _
& "DesignatorSegment Memo Not NULL, " _
& "WireColor Memo, " _
& "WireText Memo Not NULL, " _
& "TestCode Memo, " _
& "FromComponent Memo, " _
& "FromTerminal Memo, " _
& "ToComponent Memo, " _
& "ToTerminal Memo, " _
& "InsertedBy Memo, " _
& "InsertedDate Date, " _
& "UpdatedBy Memo, " _
& "UpdatedDate Date, " _
& "IncludeCutList YesNo Not NULL, " _
& "ExcludeFromBom YesNo Not NULL); "
DatabaseOps.executeNonQuery(sql)
Catch ex As Exception
MessageBox.Show(ex.Message & " - " & ex.Source)
End Try