Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

Separate version for Access/Office 2003, 2002, and 2000.

Separate version for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

Microsoft Access, Office/VBA, VB6 Modules royalty-free source code libraryMicrosoft Access Modules royalty-free source code libraryMicrosoft Access VBA and VB6 Module Library Free trial of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA

Module: SnippetADOSQLServerRst in Category SQL Server : SQL Server from Total Visual SourceBook

Example working with SQL Server recordsets via ADO using VBA and VB6.

Procedure List

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the modSnippetADOSQLServerRst module
ShowSQLADORecordsetCommandExplicitParameters Procedure Create a simple command object using the existing connection. Create explicit parameters and supply the values via the parameter object. Open the recordset from this command.
ShowSQLADOHierarchicalRecordset Procedure Create a "shaped" hierarchical recordset using the MSDATAShape OLEDB provider.
ShowSQLADORecordsetCommandExecute Procedure Open an ADO recordset with an existing connection using the execute method of an ADO command object to create a read-only recordset from a named table.
ShowSQLADORecordsetCommandFromStoredProcMultiple Procedure Create a recordset object from a stored procedure that creates three resultsets.
ShowSQLADORecordsetCommandMultiple Procedure Create a recordset from an ADO command object that creates three result sets.
ShowSQLADORecordsetCommandOpen Procedure Open an ADO recordset using the Open method using an ADO command object.
SQLADORecordsetCommandOrdinalParameters Procedure Create a simple command object using the existing connection. Supply input parameters by using ordinal values. Open the recordset from this command.
ShowSQLADORecordsetCommandParametersMultipleRS Procedure Create a simple command object using the existing connection. Create explicit parameters and supply the values via the parameter object. Open the recordset from this command. Change the parameters and re-open the recordset.
ShowSQLADORecordsetCommandSimpleParameters Procedure Create a simple command object using the existing connection. Create explicit parameters and supply the values via the parameter object. Open the recordset from this command.
ShowSQLADORecordsetConnectFromStringTableName Procedure Open an ADO recordset using a connect string argument to create an implicit connection, using a table name as the record source.
ShowSQLADORecordsetConnectFromStringView Procedure Open an ADO recordset using a connect string argument to create an implicit connection, using a view as the record source.
ShowSQLADORecordsetConnectFromUDL Procedure Open an ADO recordset using a connection created from a "Universal Data Link" (UDL) file.
ShowSQLADORecordsetConnectionExecute Procedure Open an ADO recordset with an existing connection using the execute method to create a read-only recordset.
ShowSQLADORecordsetConnFromStringSelectStatement Procedure Open an ADO recordset using a connect string argument to create an implicit connection, using a SQL Select statement as the record source.
ShowSQLADORecordsetDisconnected Procedure Create a disconnected recordset.
ShowSQLADORecordsetFromCommandWithParameters Procedure Create a command object with two parameters using an existing ADO connection. Supply the parameters as arguments to the execute method to create a read-only recordset
ShowSQLADORecordsetFromConnection Procedure Open an ADO recordset using a connection created from a separate ADO Connection object.
ShowSQLADORecordsetSPFromCommandExplicitParams Procedure Open an ADO recordset from the results of a SQL Server stored procedure returned from an ADO command object. Parameters assigned explicitly.
ShowSQLADORecordsetSPInputAndOutputParams Procedure Create a command object based on a stored procedure. Supply input parameters by creating parameter objects. Retrieve the output parameter into a parameter object. Get procedure return values into a parameter object. Execute the command, and open the recordset from this command.
ShowSQLADORecordsetStoredProc Procedure Open an ADO recordset from the results of a SQL Server stored procedure.
ShowSQLADORecordsetStoredProcCommandReturnParams Procedure Open an ADO recordset from the results of a SQL Server stored procedure returned from an ADO command object. Parameters assigned explicitly, and results returned from output parameter
ShowSQLADORecordsetStoredProcFromCommand Procedure Open an ADO recordset from the results of a SQL Server stored procedure returned from an ADO command object.
ShowSQLADORecordsetStoredProcFromCommandWithParams Procedure Open an ADO recordset from the results of a SQL Server stored procedure returned from an ADO command object, supplying parameter values.
ShowSQLADORecordsetStoredProcUsingStringParams Procedure Open an ADO recordset from the results of a SQL Server stored procedure called by creating the parameters as string arguments.

Example Code for Using Module: SnippetADOSQLServerRst

' Snippet code is partial code that demonstrates a particular feature, and does include separate Example code.
' Please see the Snippet notes for information about customizing and implementing Snippet code.

Microsoft Access Module LibraryOverview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources