473,811 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pls Help: IErrorInfo.GetD escription failed with E_FAIL

I am getting a "IErrorInfo.Get Description failed with E_FAIL" error when
trying to do a "Fill" on a dataadapter. Any ideas?? The SQL command seems
good (to an Access db).

Here is the general function that I am using in a lot of other places
successfully. This is the one that fails on "da.Fill(dt)".. .

Public Function GetDataTable(By Val strSql As String, ByVal strCnnString
As String) As DataTable
Dim cnn As New OleDbConnection (strCnnString)
Try
cnn.Open()

Dim dt As New DataTable
Dim cmd As New OleDbCommand(st rSql, cnn)
Dim da As New OleDbDataAdapte r(cmd)
da.Fill(dt) ' ***** THIS IS WHERE THE ERROR OCCURS
Return dt
Catch ex As Exception
HandleError(ex)
Finally
If cnn.State = ConnectionState .Open Then
cnn.Close()
End If
End Try
End Function

This is the full error:

"System.Data.Ol eDb.OleDbExcept ion: IErrorInfo.GetD escription failed with
E_FAIL(0x800040 05).
at System.Data.Ole Db.OleDbCommand .ExecuteCommand TextErrorHandli ng(Int32
hr)
at
System.Data.Ole Db.OleDbCommand .ExecuteCommand TextForSingleRe sult(tagDBPARAM S
dbParams, Object& executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteCommand Text(Object&
executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteCommand (CommandBehavio r
behavior, Object& executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteReaderI nternal(Command Behavior
behavior, String method)
at System.Data.Ole Db.OleDbCommand .ExecuteReader( CommandBehavior behavior)
at
System.Data.Ole Db.OleDbCommand .System.Data.ID bCommand.Execut eReader(Command Behavior
behavior)
at System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable)
at TropicalIslandC itrus.SqlHelper .GetDataTable(S tring strSql, String
strCnnString) in
c:\inetpub\wwwr oot\TropicalIsl andCitrus\Compo nents\SQLHelper .vb:line 27"

Any help would be appreciated. Thanks!
Nov 19 '05 #1
1 2038
I figured it out. A field in my db was called "Size". I think that is
messing it up. Thanks!
"VB Programmer" <do**@emailme.c om> wrote in message
news:Ox******** ******@TK2MSFTN GP14.phx.gbl...
I am getting a "IErrorInfo.Get Description failed with E_FAIL" error when
trying to do a "Fill" on a dataadapter. Any ideas?? The SQL command seems
good (to an Access db).

Here is the general function that I am using in a lot of other places
successfully. This is the one that fails on "da.Fill(dt)".. .

Public Function GetDataTable(By Val strSql As String, ByVal strCnnString
As String) As DataTable
Dim cnn As New OleDbConnection (strCnnString)
Try
cnn.Open()

Dim dt As New DataTable
Dim cmd As New OleDbCommand(st rSql, cnn)
Dim da As New OleDbDataAdapte r(cmd)
da.Fill(dt) ' ***** THIS IS WHERE THE ERROR OCCURS
Return dt
Catch ex As Exception
HandleError(ex)
Finally
If cnn.State = ConnectionState .Open Then
cnn.Close()
End If
End Try
End Function

This is the full error:

"System.Data.Ol eDb.OleDbExcept ion: IErrorInfo.GetD escription failed with
E_FAIL(0x800040 05).
at System.Data.Ole Db.OleDbCommand .ExecuteCommand TextErrorHandli ng(Int32
hr)
at
System.Data.Ole Db.OleDbCommand .ExecuteCommand TextForSingleRe sult(tagDBPARAM S
dbParams, Object& executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteCommand Text(Object&
executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteCommand (CommandBehavio r
behavior, Object& executeResult)
at System.Data.Ole Db.OleDbCommand .ExecuteReaderI nternal(Command Behavior
behavior, String method)
at System.Data.Ole Db.OleDbCommand .ExecuteReader( CommandBehavior
behavior)
at
System.Data.Ole Db.OleDbCommand .System.Data.ID bCommand.Execut eReader(Command Behavior
behavior)
at System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable)
at TropicalIslandC itrus.SqlHelper .GetDataTable(S tring strSql, String
strCnnString) in
c:\inetpub\wwwr oot\TropicalIsl andCitrus\Compo nents\SQLHelper .vb:line 27"

Any help would be appreciated. Thanks!

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1196
by: Matthew Sajdera | last post by:
All - I need some help debugging a Null Reference Exception error I keep getting when callling a specific method from a COM object reference. I need help getting started where to look to see what may be causing this error. Other method calls to this COM object perform normally, but this specific call returns the following error: Sysyem.NullReferenceException: Object reference not set to an instance of an
0
1364
by: viresh | last post by:
Hi I have this simple test console app. Main function creates a thread which is calls GetQueuedCompletion port. After creating a thread it keeps on calling PostQueuedCompletion port in an infinite loop . On running this test program, i see the memory usage in task manager continously rising?? I am pasting the code below. Can you see anything wrong? //my ov struc class OVERLAPPEDPLUS :public OVERLAPPE public:
2
1515
by: Neo Geshel | last post by:
I have the two subs: Sub UniqueHits() Dim StrSQLQuery As String Dim ObjAdapter as New OleDbDataAdapter() Dim ObjDataSet as DataSet StrSQLQuery = "SELECT * FROM Browser WHERE IsUnique = True" ObjAdapter.SelectCommand = new OleDbCommand(StrSQLQuery, ObjConnection) ObjDataSet = new DataSet()
0
382
by: ayha1999 | last post by:
Hi, Has anybody ever encountered this error? When using the OLEDbDataReader with Access I get the following error: "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)" ayha
0
1200
by: mkl | last post by:
Hello I use this code to read a Excel File. Dim connectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\test\bla.xls;Extended Properties='Excel .0;HDR=YES;'" Dim sheetName As String Dim excelConnect As New OleDbConnection(connectString) excelConnect.Open()
1
2437
by: rdc02271 | last post by:
Hello! I have been looking for a VB 6 collection like object (BUT Faster) for some time now without success. Not being a C++ programmer the thought of writting my collection/map type COM Object didn't make my days very sunny. Anyway I google for some code and I found something that manages to be as slow as VB6 collection ;( The Item method returns a variant and I wondered if returning wouldn't be faster (I just want to return COM...
3
1920
by: FinPingvin | last post by:
Hi! This code wont work properly, it returns true for showing all maps, but not any files. It is supposed to filter the JFileChooser to only show *.mp3 files. I have looked at it too long now, so i think its best to let someone else to look at it now :p Here it is: import javax.swing.filechooser.*; import java.io.File;
4
1239
by: civicjai | last post by:
Can anyone teach me how to An item code is to be entered by the user. If it is an existing item code that matches an item in the items array , a description of the item with its unit price is displayed. For example, if the user types the item code “1000” and then presses the Enter key,“low-fat milk (1 litre)/$2.15” is displayed on the screen, followed by another prompt for typing the next item code. And also,If the entered item code...
1
13308
by: HarishAdea | last post by:
Hi, I am trying to run the JAVA pgm, but it is giving error as "selection does not contain a main type". The filename is "ScoreLeadSummary.java" when i try to run it or debug,it gives the pop up as "selection does not contain a main type" Please help me out in resolving the above issue to run the .java file. I am facing same issue with other .java files inside the project The code is as shown below: package...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10130
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.