|
-
Feb 27th, 2006, 01:58 PM
#1
Thread Starter
Frenzied Member
OleDbException with OleDbParameters
I'm getting the following exception when i try and insert data into an excel sheet using ado. I've tried changing the OleDbType but nothing seems to work and was hoping that someone could maybe tell me what i'm doing wrong or if it's because an excel cell is set to hold 255 characters? if so why can i paste the data into an excel sheet?
A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll
System.Data.OleDb.OleDbException: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at DsgSave.FileOperation.PerfomAdoExcelWrite(String filename, Int32 size, DataSet ds) in C:\Documents and Settings\derekklingman\My Documents\Visual Studio 2005\Projects\CDEnvironment\DsgSave\FileOperation.vb:line 277
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|