Microsoft KB Archive/280138

= PRB: Error 80040e14 When You Create a Recordset with adVarWChar =

Article ID: 280138

Article Last Modified on 8/23/2001

-

APPLIES TO


 * Microsoft ActiveX Data Objects 2.5
 * Microsoft ActiveX Data Objects 2.6
 * Microsoft ActiveX Data Objects 2.7

-



This article was previously published under Q280138



SYMPTOMS
When you try to use the Shape Provider's Append New clause to build a Recordset from scratch, you may receive the following error message:

Run-time error '-2147217900 (80040e14)':

Width specified for NEW column  is too large.



CAUSE
The Shape Provider does not support NEW string columns whose maximum lengths are greater than 255 characters. If the NEW string columns are greater than 255 characters, they must have an unlimited maximum length.



RESOLUTION
To resolve this problem, use a Type such as adLongVarChar or adLongVarBinary that does not require a Length argument (that is, they have unlimited length).



Steps to Reproduce Behavior
 In Visual Basic, start a new Standard EXE project. Form1 is created by default. Add a reference to Microsoft ActiveX Data Objects Library.  In the Load method of Form1, paste the following code: Dim rs As ADODB.Recordset Set rs = CreateObject(&quot;ADODB.Recordset&quot;) rs.Open &quot;SHAPE APPEND NEW adChar(10) NewCol1,&quot; & _ &quot;NEW adVarWChar(500) NewCol2&quot;, _ &quot;Provider=MSDATASHAPE;Data Provider=None;&quot;, _ adOpenStatic, adLockBatchOptimistic 

Additional query words: Run-time error '-2147217900 (80040e14)'

Keywords: kbcodesnippet kbprb KB280138

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.