Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Commands

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
Can anyone tell me the functions of the Data Commands in VID.&nbsp;&nbsp;I have just finished reading the bit of info on it that I have and I understand that it sets up the rules for data retrieval ie records from a table, or results of a query.<br><br>But can you not do exactly the same thing with the recordset object itself.&nbsp;&nbsp;I have been putting in my recordsets and then setting them to the stored procedure, table or query that I require for them.<br><br>I suppose the data commands would allow me to reuse the same set of rules for more than one recordset if I needed to.&nbsp;&nbsp;I guess that would make it beneficial if I had to use the same thing more than once.&nbsp;&nbsp;But is there any other solid reason that I should want to use the data commands instead of just setting up the recordset I have dragged onto my page?<br><br>But here is my final part to this question.&nbsp;&nbsp;When I make a data command, and then drag it into my asp page it creates a recordset object with that DECommand selected as the database object.&nbsp;&nbsp;Which was giving me errors.&nbsp;&nbsp;Now it isn't (I just tried it).&nbsp;&nbsp;If I get the error again I will post it here and maybe someone can tell me if they know anything about it. <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>

 
Dear Crystal,<br><br>The following is a small excerpt from the MDAC API Reference on MSDN. It provides a very brief statement regarding the capabilities of Command objects vs. SQL Statements. There is much more material to read beyond this, for instance each data source may or may not expose certain capabilities.<br><br>Hope this helps<br>-pete<br><br>FROM MSDN:<br><br>Note&nbsp;&nbsp;&nbsp;To execute a query without using a Command object, pass a query string to the Execute method of a Connection object or to the Open method of a Recordset object. However, a Command object is required when you want to persist the command text and re-execute it, or use query parameters.<br>
 
Thanks pete<br><br>I will try to look up the reference you mention, so I can get a better understanding of the differences.<br> <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top