80 likes | 197 Views
The Tip of the ADO-burg. Francisco H Tapia. Command Connection Error Parameter. Property Record RecordSet Stream. Ado Objects. Who’s your provider?. Connection providers…. OLEdb providers JET SQL TEXT XML mySQL Etc…. What’s in a command?.
E N D
The Tip of the ADO-burg Francisco H Tapia
Command Connection Error Parameter Property Record RecordSet Stream Ado Objects
Connection providers… • OLEdb providers • JET • SQL • TEXT • XML • mySQL • Etc…
What’s in a command? • Excute stored procedures or queries where a result is not expected back • .Execute , , adExecuteNoRecords • Pass multiple parameters • .Parameters.Append .CreateParameter("CompanyName", _ adVarWChar, adParamInput, 50, sCompanyName) • .Parameters.Append .CreateParameter("ContactFirstName", _ adVarWChar, adParamInput, 30, sContactFirstName) • .Parameters.Append .CreateParameter("ContactLastName", _ adVarWChar, adParamInput, 50, sContactLastName) • Receive a return a single pice of data instead of a recordset… • .Parameters.Append .CreateParameter("RETURN_VALUE", _ adInteger, adParamReturnValue, 0) • ' Print new identity value Debug.Print .Parameters("job_id").Value ' New Identity http://www.able-consulting.com/ADO_Faq.htm
Recordsets… • Conn.stp_MyStoredProcedure Param1, rs • Store Access queries in MDB BE • Create an updateable recordset on the fly OR • Use the Command object to execute the procedure. • Set rs = cmd.execute
LINKS!!! • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmscadoprogrammersguide.asp • http://www.able-consulting.com/ADO_Faq.htm • http://www.devguru.com/technologies/ado/quickref/ado_index.html • http://www.vbsquare.com/databases/begado/\ • www.google.com