General information
Category:
COM/DCOM and OLE Automation
Title:
DAO and inserting into legacy FPW 2.6 files
I am using the following code and DAO to insert a record into a FPW2.6 table with two fields Status - numeric and WorkReq - Memo.
On Error GoTo ErrRoutine
Dim dbHermes As Database, rcsTemp As Recordset
Call ReadINIFile
Set dbHermes = OpenDatabase(gDatabaseLocation, False, False, "dBASE IV")
Set rcsTemp = dbHermes.OpenRecordset(gDatabaseName, 2)
rcsTemp.AddNew
rcsTemp("WorkReq") = strMessage
rcsTemp("Status") = 1
rcsTemp.Update
rcsTemp.Close
dbHermes.Close
DBUpDate = True
Exit Function
Now, "Status" inserts fine but when I write "WorkReq" DAO returns an error: "Field is too small for data size". "WorkReq" is a memo field and if I write 28 characters or less the field inserts fine. Is this an issue of too much data hitting the pipe at once or do I need a different driver?
Thanks for any and all help with this problem.
Jim Smith
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only