Problem with Memo field in Jet 2.5 Parameter Query 
Author Message
 Problem with Memo field in Jet 2.5 Parameter Query

YOU!  Yes, you the expert.  Please explain this, if you can:

I am using Visual Basic 4.0 16-bit (Enterprise) to access (through Jet
2.5) an MS Access 2.0 database.  In the database, I have an update query
that accepts parameters.  In general, the query's SQL looks like this
(please excuse slight syntax errors, I don't have it right in front of
me):

PARAMETERS [qpID] Long, [qpFoo] Long, [qpMemo] LongText
UPDATE tblBogus SET Foo=[qpFoo], MemoField=[qpMemo] WHERE ID=[qpID]

In the code, I set a QueryDef variable to this query and set all the
parameters and execute it.  The code bombs with an "Invalid Property
Value" error if the value of [qpMemo] is > 255 characters.  Just so
we're on the same page, here's a code snippet:

dim qdTemp as QueryDef

  .
  .
(Fill local variables with values from form, including
long text value)
  .
  .

set qdTemp = MyDB.QueryDefs("qruMyUpdateQuery")
With qdTemp
  !qpID = lLongIDNumber
  !qpFoo = lSomeLongInteger
  !qpMemo = sLargeTextValue   '<-- Bombs here if Len(sLargeTextValue) >
255
  .execute
End With

According to VB4 documentation AND Microsoft's TechNet, the LongText
parameter type (in the SQL for the query) should be able to handle 1.2
GB of text.  If I use the Jet "generic" parameter type of "Value"
(PARAMETERS ...,[qpMemo] Value), it still bombs.  If I remove the
PARAMETERS clause (which is optional anyway), it still bombs.

The help for the "Invalid Property Value" error says that a possible
cause is that the Value property of a Parameter object is too long.
Well duh.  But the Value should be able to handle 1.2 GB!  And I'm only
trying, oh, 1000 characters or less.

Now, Mr. or Mrs. Expert, do you know what I've missed?  The
documentation and the execution of this logic seems pretty
straightforward to me.  Where have I goofed?  Please don't suggest other
ways of updating records (i.e. using a RecordSet and .Edit, etc.)  I
need to use a parameter query here and I need to send large text values
through the parameters.  Any solutions?

Thanks in advance for any help!

Michael deFreitas
Whistler Computing, LLC



Mon, 25 Oct 1999 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Stored query parameter object problem with MEMO field

2. FoxPro 2.5 and Memo Fields Problem

3. ADO 2.5 and Jet 4.0 Parameters

4. Memo Field Update Problem ADO JET

5. Detecting changes in FoxPro 2.5 memo fields

6. memo fields in parameter queries?

7. How can I get binary datas from FOX 2.5 Memo field in VB6

8. FP W 2.5 Memo Fields in Report Writer Printing Only 4 Lines

9. Error setting field to Null with Jet 4 (SP5) and ADO 2.5

10. Limit of 255 fields in Jet 2.5

11. Error setting field to Null with Jet 4 (SP5) and ADO 2.5 in VB

12. ADO 2.5/JET 4 AutoNumber Field Bug?


 
Powered by phpBB® Forum Software