
insert large data into memo field problem
You're probably being limited by the maximum size of a compiled query.
For a data value that large, I'd open a recordset on the table and
stick the value in that way:
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Table1")
With rs
.AddNew
!FileName = strFile
!FileData = strTemp
.Update
.Close
End With
Set rs = Nothing
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Quote:
> Hi, I have the code to save the filename and the content into the
> Table, below is the codes
> strSql = "INSERT INTO Table1 VALUES ( '" & strFile & "','" &
> ReplaceField(strTemp) & "')"
> CurrentDb.Execute strSql
> Function ReplaceField(strName As String) As String
> ReplaceField = Replace(strName, "'", "''")
> End Function
> strTemp is the variable stores the content of the text file.
However,
> I found that it couldn't work when the file is too large around 40K
> ....
> is there any way to resolve this ??
> ----------------------------
> Ivan Lee
> http://www.geocities.com/ginola79/