title: What are the String, LongText and ShortText lengths? Setting Long Text as SQL Parameter results in Error 3001
body: <p>When I create an append Query in ms-access 2013 with parameters and any of those parameters'  type is set to <code>LongText</code> the query fails with error code <code>3001 Invalid Argument</code>. Changing the type to <code>ShortText</code> however results in a working query. Both version are runnable by double clicking the query in access itself, but the first one fails when running it via following code:</p>
  
  <pre><code>Dim db As DAO.Database
  Set db = CurrentDb
  Dim qdf As QueryDef
  Set qdf = db.QueryDefs("NeuerFachlicherInhalt")
      qdf!Inhalt = inhalte("DefaultInhalt")
      qdf!Formular = inhalte("Formular")
  qdf.Execute
  </code></pre>
  
  <p>The table I insert the parameter to has a field type of <code>LongText</code> and therefore I would expect this to work - what is the root cause of the issue here? And how can I pass in a long text if I am unable to specify a <code>LongText</code> as parameter?</p>
  
  <p>I think it might be connected to the length limitations of Strings in access. What exactly are those limitations? Google redirects you to <a href="https://stackoverflow.com/questions/17927042/concatenation-and-max-length-of-string-in-vba-access">concatenation and max length of string in VBA, access</a> regarding the question for string lengths, but i can not find a definite answer to the length question(s):</p>
  
  <ul>
  <li>how long can the text for <code>ShortText</code> be?</li>
  <li>how long can the text for <code>LongText</code> be?</li>
  <li>how long can the text for a vba <code>String</code> be?</li>
  </ul>
  
  <p>My queries in the two cases look like</p>
  
  <pre class="lang-sql prettyprint-override"><code>PARAMETERS Inhalt LongText, Formular Short;
  INSERT INTO FachlicherInhalt ( Inhalt, Formular )
  SELECT [Inhalt] AS Expr1, [Formular] AS Expr2;
  
  PARAMETERS Inhalt Text ( 255 ), Formular Short;
  INSERT INTO FachlicherInhalt ( Inhalt, Formular )
  SELECT [Inhalt] AS Expr1, [Formular] AS Expr2;
  </code></pre>