adodb - ms access - return records from sql Stored procedure -



adodb - ms access - return records from sql Stored procedure -

i have access 2010 , want phone call sql stored proc on sql 2008 server , homecoming results recordset or bind straight report.

the method below returns error "feture not available in adp" or - works form not report.

how go doing this?

dim cn new adodb.connection dim rs adodb.recordset dim cm new adodb.command 'use ado connection access uses set cn = currentproject.accessconnection cn .provider = "microsoft.access.oledb.10.0" .properties("data provider").value = "sqloledb" .properties("data source").value = "dsidsw923" .properties("integrated security").value = "sspi" .properties("initial catalog").value = "promotions_dev_dsi" .open end 'create instance of ado recordset class, , 'set properties set rs = new adodb.recordset cm .activeconnection = cn .commandtext = "spcheckprodwkconsist" .commandtype = adcmdstoredproc set rs = .execute() end 'set form's recordset property ado recordset set me.recordset = rs set rs = nil set cn = nil set cm = nil

consider creating view wrap results of stored procedure (exec usp_whatever) , create linked table new view.

also, may able create passthrough query (exec usp_whatever) executes stored procedure , returns results directly. bind study or form query.

ms-access adodb ms-access-2010

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -