Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
| Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 15th, 2004, 10:33 AM
Registered User
 
Join Date: Dec 2003
Location: Lawrenceville, Georgia, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Having Trouble With Binding Dataset in Access

I have a form that I'm currently trying to bind with a access
database(which contains to tables). I used the OleDataAdapter to
obtain my OleDbConnections between my form and the two tables in the database. I gotten the first table in my database to generate a dataset for my form. But when I try to generate a dataset for the second table in my database, I received this error message Retrieving the schema for OleDbAdapter2 failed. Unspecified error: E_FAIL(0x80004005)

Any Advise on how to solve this error is greatly welcome. Thanks!

 
Old August 26th, 2004, 03:22 PM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Si,
I came across your message and I found it works for me. I connected to access and select 5 tables --> 5 datasets by coding ... NOT WIZZARD...
************************************************** ***
'from FormLogin::::
'********************
Public Shared dsScreen1, dsScreen2, dsScreen3, dsScreen4, dsScreen5 As New DataSet
    Public Shared WithEvents bmb As BindingManagerBase
    Public Shared daScreen1, daScreen2, daScreen3, daScreen4, daScreen5 As New OleDbDataAdapter
    Public Shared DRScnn As New OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Directory.GetCurrentDirectory & "\" & "DRS.mdb")
'********************
'from Form1:::: use OleDbCommandBuilder
'********************
Public Shared cmdbuilder1 As New OleDbCommandBuilder(FrmLoginShare.daScreen1)
    Public Shared cmdbuilder2 As New OleDbCommandBuilder(FrmLoginShare.daScreen2)
    Public Shared cmdbuilder3 As New OleDbCommandBuilder(FrmLoginShare.daScreen3)
    Public Shared cmdbuilder4 As New OleDbCommandBuilder(FrmLoginShare.daScreen4)
    Public Shared cmdbuilder5 As New OleDbCommandBuilder(FrmLoginShare.daScreen5)
'********************
'then fill the dataset
'********************
FrmLoginShare.DRScnn.Open()
        FrmLoginShare.daScreen1.SelectCommand = New OleDbCommand("select * from screen1 where RecordID = (select Max(RecordID) from screen1)", FrmLoginShare.DRScnn)
        FrmLoginShare.daScreen1.FillSchema(FrmLoginShare.d sScreen1, SchemaType.Source, "Screen1")
        FrmLoginShare.daScreen1.Fill(FrmLoginShare.dsScree n1, "Screen1")
************************************************** ***
let me know if it helps or u can contact me at "cuu.t@doh.wa.gov" Good luck.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding a menu with dataset zaghmout ASP.NET 2.0 Professional 1 August 14th, 2007 05:24 AM
Binding a DataSet to Cystal Report snufse Crystal Reports 0 March 30th, 2007 07:06 AM
binding the grid to dataset?? thas123 ASP.NET 2.0 Basics 1 December 27th, 2006 02:15 PM
Binding Dataset to DataCombo in .NET TokenBug ADO.NET 4 September 29th, 2006 05:02 AM
Binding a Dataset to a Report ChrisLane Crystal Reports 4 March 9th, 2004 02:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.