Database
  Home arrow Database arrow Page 2 - Opening a Record Object Referencing an Ope...
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE

Opening a Record Object Referencing an Open Recordset Object
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2006-09-12

    Table of Contents:
  • Opening a Record Object Referencing an Open Recordset Object
  • Opening a Recordset by Providing an URL
  • Opening the Record Object after Opening the Recordset Object
  • RecordType and Mode Properties

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Opening a Record Object Referencing an Open Recordset Object - Opening a Recordset by Providing an URL
    (Page 2 of 4 )

    Create a form RstRecord in your MDB application. This MDB database has no tables; we are just using the Form objects. Add a button, and to the click event of the command button, paste this code. It shows how easy it is to open a recordset object providing an URL.

    Private Sub Command0_Click()
    Dim rst As ADODB.Recordset
    Set rst = New ADODB.Recordset
    'rst.Open "", "URL=http://hodentek/"
    rst.Open "Hodentek", "URL=http://hodentek/"
    MsgBox ("Recordset is open:" & rst.State)
    rst.Close
    MsgBox ("Recordset is closed:" & rst.State)
    End Sub

    You may be wondering, what about the provider information needed to open the recordset object? If the IIS (Web Server) is correctly installed, this provider is automatically used. Add the following code after the rst.open but before the rst is set to a nothing statement.

    Private Sub Command0_Click()
     Dim rst As ADODB.Recordset
     Set rst = New ADODB.Recordset
     rst.Open "", "URL=http://hodentek/"
     Text1.SetFocus
     Text1.Text = rst.ActiveConnection
     Text3.SetFocus
     Text3.Text = rst.Source
     Text5.SetFocus
     Text5.Text = rst.CursorType
     rst.Close
     Set rst = Nothing
     End Sub

    When the form is open and the button is clicked the following details are displayed. The other form’s format details are: Text1 control’s Scroll Bars property is set to Vertical and the Can Grow property is set to “Yes.”

    You may be wondering what the fields collection consists of. The first item is AccXML.htm - an alphabetically sorted HTM file, followed by ‘http://hodentek’ and ‘http://hodentek/AccXML.htm’.

    More Database Articles
    More By Jayaram Krishnaswamy


       · Microsoft's first foray into accessing non-traditional data storage area resulted in...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway