Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.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 November 3rd, 2003, 03:53 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default VS.net Connection to AcessDatabase

Dear Users ,

While connecting to my database I run into the following error {System.____ComObject}

WHy?

Here is the code behind an action button..



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim DB As DAO.Database ' Decaration of database
        Dim WS As DAO.Workspace 'Decaration of workspace used
        Dim Main_TD As DAO.TableDef 'Decaration of Table definitions

        Dim Main As DAO.Recordset
        Dim Main_Dynaset As DAO.Recordset
        'Dim db_Database As Object

        Dim nStart As String
        Dim nStop As String
        Dim nItem As String
        Dim strSQL As String

        nStart = txtStart.Text
        nStop = txtEnd.Text
        nItem = CboItems.Text

        'Open database

        db_Database = DAODBEngine_definst.OpenDatabase("C:\DATA\ACCESS\1 3FloorEquipment.mdb")

        'SELECT Requests.*FROM Requests;
        'Main = db_Database.OpenRecordset("Requests", DAO.RecordsetTypeEnum.dbOpenTable)
        'Main.Close()
        strSQL = "SELECT * FROM [Requests]"
        'Main = DB.OpenRecordset(strSQL, DAO.RecordsetTypeEnum.dbOpenDynaset)

        Main = db_Database.openRecordset(strSQL, DAO.RecordsetTypeEnum.dbOpenDynaset)

        Listbox1.Items.Add(Main)
        db_Database.Close()
    End Sub

***********
Also have UpgradeSupport VB (Declaration) page

Module UpgradeSupport
      Friend DAODBEngine_Definst As New DAO.DBEngine()
End Module
 
Old November 3rd, 2003, 09:42 PM
Registered User
 
Join Date: Nov 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to uponline_aom
Default

where is the Connection ?

 
Old November 6th, 2003, 08:46 AM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you trying to use DAO connection COM object??
Please bare in mind .Net use ADO rather than DAO, try use .Net Ole or download ODBC.Net from MSDN at www.msdn.microsoft.com
Use ADO.Net, you might find it easier..

Kasie


 
Old November 12th, 2003, 12:42 AM
Registered User
 
Join Date: Nov 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Connection Pooling & MS Access.

Can I dynamically change connection pooling parameters?
Sometimes, I have error, when close connection.

Thanks In Advance!
Jon.

http://www.naptaxes.com/AAJ/
 [Searching jobs from your desktop and automatically sends resume.]
--------------------------------------------------------------------------------






Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Connection Using VB.NET prasanta2expert ADO.NET 2 January 20th, 2007 07:41 AM
Connection to Access Database in .Net KarthikR BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 16th, 2007 11:56 AM
Any way in .NET to dial a connection ?? thandermax General .NET 0 July 6th, 2006 02:09 PM
socket connection in a .NET Applet slim_naldy General .NET 0 May 25th, 2005 08:04 PM





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