insert large data into memo field problem 
Author Message
 insert large data into memo field problem

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.*-*-*.com/



Tue, 02 Aug 2005 00:57:35 GMT  
 insert large data into memo field problem
Ginola,
From the help menu re: memo feild size:
"Up to 65,535 characters. (If the Memo field is manipulated through DAO and
only text and numbers [not binary data] will be stored in it, then the size
of the Memo field is limited by the size of the database.)"

While I am not sure about file size limitations, a work around might be to
save the text as a text file, and store the path and name of the text file.

Hope this helps.

Irvin.



Tue, 02 Aug 2005 06:08:13 GMT  
 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/



Tue, 02 Aug 2005 15:11:36 GMT  
 insert large data into memo field problem

Quote:
>-----Original Message-----
>Ginola,
>From the help menu re: memo feild size:
>"Up to 65,535 characters. (If the Memo field is

manipulated through DAO and
Quote:
>only text and numbers [not binary data] will be stored

in it, then the size
Quote:
>of the Memo field is limited by the size of the
database.)"

>While I am not sure about file size limitations, a work
around might be to
>save the text as a text file, and store the path and

name of the text file.
Quote:

>Hope this helps.

>Irvin.

>.



Sun, 07 Aug 2005 05:48:57 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Memo fields - problems reporting 2 memo fields

2. Problem returning data from a scroll text box to an Access memo field

3. Problem reading data from memo field (Access)

4. Append memo field to a different memo field

5. Large Memo field search and replace error

6. Large Memo Field search fix from Microsoft

7. ADO/SQL - Updating large memo field

8. inserting text to specific location into memo field

9. Insert a line break into a memo field?

10. Insert line break in memo field w/ code

11. inserting html code into access memo-field

12. Update/Insert into An Access2000 Memo field

 

 
Powered by phpBB® Forum Software