[AccessD] ADO Save recordset format adPersistADTG

Martin Reid mwp.reid at qub.ac.uk
Wed Jun 14 13:40:39 CDT 2006


The for next is the first time I have tried it this way.Something basic is not there. I know it. Just cant think.

 

Private Sub Form_Open(Cancel As Integer)

On Error GoTo Err_Form_Open

Dim rststudent As ADODB.Recordset

Dim conn As ADODB.Connection

Dim fld As ADODB.Field

Set conn = CurrentProject.AccessConnection

Set rststudent = New ADODB.Recordset

rststudent.ActiveConnection = conn

rststudent.Open "usp_GetStudentData", , , , adCmdStoredProc

If rststudent.EOF = True Then

MsgBox "No Student Data"

Exit Sub

Else

 

For Each fld In rststudent.Fields

                        Me(fld.Name).Value = fld.Value

Next

End If

 

Exit_Form_Open:

Exit Sub

Err_Form_Open:

        MsgBox Err.Description, , "Error in Sub Form_frmChapter6SPExample.Form_Open"

        Resume Exit_Form_Open

    Resume 0   

End Sub

 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974477
 

________________________________

From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert
Sent: Wed 14/06/2006 19:33
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] ADO Save recordset format adPersistADTG



This reference  gives an example of what it's for. The idea is you can
create an application that uses database methods, without there actually
being a database!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninvb00/ht
ml/ADORecordset.asp


Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, June 14, 2006 2:13 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] ADO Save recordset format adPersistADTG


Hi all

With ADO you can save a recordset to a file, normally an XML file, but
another format, Microsoft Advanced Data TableGram, exists:

  rst.Save "d:\temp\records.dat", adPersistADTG

Where or why could this binary format be used?
It creates file sizes about 1/3 of the XML file created if adPersistXML had
been used. Is it just a proprietary format for storing and retrieval of data
to/from a single external file?

/gustav

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 




More information about the AccessD mailing list