| << 13.2.0- Characteristics of the Recordset Object | Chapter13 | 13.2.2- What is the Active Connection? >> |
What is a Source?
The source is where thedata comes from. In the example's we've seen so far, we've always used a tablename. But the Source parameter could takethe form of a SQL statement:
objRec.Open "SELECT * FROM Movies", ...
...or a stored procedure or query:
objRec.Open "sp_contact"
…or an ADO Command object:
objRS.Open "qryContact"
We'll be looking at stored procedures, queries and the Command object a little later.
The Recordset Object's Source Property
When you call the Recordsetobject's Open method, specifying the Source parameter, you fill the Recordset's Sourceproperty indirectly.
In fact, you don't have to use the first parameter of the Open method to specify the source. Instead, you can setthe Source property directly:
objRS.Source = "SELECT * FROM Movies"
objRS.Open
| << 13.2.0- Characteristics of the Recordset Object | Chapter13 | 13.2.2- What is the Active Connection? >> |

RSS

