Microsoft Access
  Home arrow Microsoft Access arrow Page 6 - Using ADO`s Record Object with URLs
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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? 
MICROSOFT ACCESS

Using ADO`s Record Object with URLs
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2006-08-08

    Table of Contents:
  • Using ADO`s Record Object with URLs
  • Looking at URLs on the Localhost
  • Creating a Reference to ADO 2.8
  • Exploring the Web Page URL with ADO
  • Exploring the Web Folder URL with ADO
  • Opening the Connection with a Shorter String

  • 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
     
     
    ADVERTISEMENT


    Using ADO`s Record Object with URLs - Opening the Connection with a Shorter String


    (Page 6 of 6 )

    The connection string derived from the Url.udl file is very long, but it is sufficient to use a shorter string such as the code shown in the next paragraph.

    Private Sub Command0_Click()
    Dim con As New ADODB.Connection
    Dim rec As New ADODB.Record
    Dim constr As String
    constr = "Provider=MSDAIPP.DSO;" & _
    "Data Source=http://hodentek/TestingService/HelloOra.asmx"
    con.Open constr
    rec.ActiveConnection = con
    rec.Open
    MsgBox ("It is open")
    MsgBox (rec.ParentURL)
    End Sub
    

    A complete list of different ways to open the record, recordset, and connection objects is available here.

    The Record object also opens with implicit reference to the MSDAIPP when the connection string is not explicitly provided, as in the following code:

    Private Sub Command1_Click()
    Dim rec As New ADODB.Record
    rec.Open "", "URL=http://localhost/TestingService"
    Dim feld As ADODB.Field
    For Each feld In rec.Fields
    Debug.Print feld.Name & "/" & feld.Value
    Next
    End Sub
    

    The Field Name and Field Value from the above code will be as shown in the next paragraph (copied from the immediate window). In this case, the resource is the folder with a number of items referring to the default site. The DAV: items refer to the WebDAV which stands for Web Distributed Authoring and Versioning attributes.

    RESOURCE_PARSENAME/ TestingService
    RESOURCE_PARENTNAME/ http://localhost/
    RESOURCE_ABSOLUTEPARSENAME/ http://localhost/TestingService
    RESOURCE_ISHIDDEN/ 
    RESOURCE_ISREADONLY/ 
    RESOURCE_CONTENTTYPE/ 
    RESOURCE_CONTENTCLASS/ 
    RESOURCE_CONTENTLANGUAGE/ 
    RESOURCE_CREATIONTIME/ 
    RESOURCE_LASTACCESSTIME/ 
    RESOURCE_LASTWRITETIME/ 
    RESOURCE_STREAMSIZE/ 
    RESOURCE_ISCOLLECTION/ True
    RESOURCE_ISSTRUCTUREDDOCUMENT/ 
    DEFAULT_DOCUMENT/ http://localhost/Default.htm;
    http://localhost/Default.asp;
    http://localhost/index.htm;
    http://localhost/iisstart.asp;
    RESOURCE_DISPLAYNAME/ TestingServic
    RESOURCE_ISROOT/ False
    RESOURCE_ISMARKEDFOROFFLINE/ 
    RESOURCE_METATAGS/ 
    RESOURCE_LISTBASETYPE/ 
    DAV:name/ TestingService
    DAV:parentname/ http://localhost/
    DAV:displayname/ TestingService
    DAV:iscollection/ True
    DAV:isroot/ False
    DAV:defaultdocument/ http://localhost/Default.htm;
    http://localhost/Default.asp;
    http://localhost/index.htm;
    http://localhost/iisstart.asp;

    Summary

    The URL is only one way of opening a Record object where the record source is an URL. A Record object can also be opened where the source may take these different forms: a Command object, a SQL statement, a table name, or an open recordset object. These different ways are not discussed. Also not discussed are the Copy and Delete methods shown earlier. The Record object and the Recordset object, though not the same, are related. Since both of them have fields collection, one has to be careful when using these objects. The code in this tutorial may be used as is, making changes to the available URL.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Yes, as this tutorial shows you can dissect the folder / file structure of your...
     

    MICROSOFT ACCESS ARTICLES

    - Converting a MySQL Database to an Excel Work...
    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek