473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

I have tried everything I can to get beyond this error which shows below as ‘<<<<< error here. It is trying to fill a dataset from a data adapter. If I change the SELECT statement to just ‘SELECT * FROM xTable’ I get the correct number of records in each table. But anytime I try with a more complex statement I get the error message shown below which indicates System.Data.Common.DbDataAdapter.Fill(DataSet dataSet. I’ve completely erased all data and entered a new set of test data so I know there is no problem with relationships. Each table has primary key which is foreign key in other table.
IS there something wrong with the Imports section: Imports System

Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient

Imports System.Drawing
Imports System.Windows.Forms
Imports System.Guid

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolTip

Imports Janus.Windows.GridEX

Did I miss an data update for Visual Studio?

Expand|Select|Wrap|Line Numbers
  1. Private Function LoadgriPrices() As Boolean
  2.          Try
  3.             gblConn = New OleDbConnection(QponConnStr)
  4.             Dim dagexLoad As New OleDbDataAdapter
  5.             Dim dsgexLoad As New DataSet
  6.             Dim recCount As Integer 'Tracks the number of records in the dataset dsgexLoad
  7.  
  8.             Dim mySelectQuery As String = "SELECT i.ItemsID, c.Category,  s.SubCategory, " _
  9.                 & "i.Maker, i.ItemName, i.Measure, i.Size " _
  10.                 & "FROM (Categories AS c INNER JOIN SubCategory AS s ON c.CategoriesID=s.CategoriesID) " _
  11.                 & "INNER JOIN Items AS i ON s.SubCategoryID=i.SubCategoryID;"
  12.  
  13.             Dim myConnection As New OleDbConnection(QponConnStr)
  14.             Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
  15.             myConnection.Open()
  16.             dagexLoad.SelectCommand = myCommand
  17.             dagexLoad.Fill(dsgexLoad) ‘<<<<< error here
  18.  
  19.             If Not dsgexLoad.Tables(0).Rows.Count > 0 Then
  20.  
Immediate window error message:
{"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."}
System.Data.OleDb.OleDbException: {"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: Nothing
InnerException: Nothing
Message: "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."
Source: "System.Data"
StackTrace: " at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior) at System.Data.OleDb.OleDbCommand.System.Data.IDbComm and.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behav
ior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at QPon.Pricing.LoadgriPrices() in C:\QPon\QPon\QPon\Pricing.vb:line 129"
TargetSite: {System.Reflection.RuntimeMethodInfo}

Sorry for the length of the post but this has been bugging me for a long time as the same code seems towork perfectly well in a Access 2000 database with VB.Net programming. Any direction as WHAT I seem to be missing would be helped. Happen to send a demo attachement if desired.
May 14 '12 #1
2 4255
PsychoCoder
465 Expert Mod 256MB
Try this, Size is a reserved word in SQL, try changing
Expand|Select|Wrap|Line Numbers
  1. i.Size
to
Expand|Select|Wrap|Line Numbers
  1. i.[Size]
to see if that solves your issue
May 14 '12 #2
Thank you had no idea that was the problem. In other istances I have gotten error messages that something was a reserved word, but I guess because it was inside the "SELECT statement" VB.Net did not highlight it. Suprised that Access 2007 didn't flag it. But thanks very much.
May 14 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
0
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the...
0
by: silesius | last post by:
I've been using VS.NET 2003 to develop a webapplication using C#. Today I exported the application to another webserver I begun experiencing problems. It's a simple application that retrieves...
1
by: Luis Esteban Valencia | last post by:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source...
1
by: Greg Cyrus | last post by:
Hi, i have created a function to open a Databse by OLEDB and fill it into a System.Data.DataSet-Objekt by oleDBAdapter.Fill-Mehtod.. Now I want to assign this DataSet to a normal...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
1
by: Siegfried Heintze | last post by:
I'm using a third party hosting service. I presently have a Web Service on this hosting service's server that loads and executes a native mode DLL. This demonstrates that the hosting service has...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.