Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Using stored procedures with access controls


Message #1 by "stephen" <stephen@v...> on Thu, 28 Feb 2002 03:36:00
Hello,



I am using Access 2000 with SQL server back end.



I build a SPROC in code and return a recordset, i would like to then put 

the result of the recordset into a combo box. 



I cannot find an easy way to do this, is there a control that will accept 

stored procs or do i need to run a loop through the recordset and add each 

value manually?



Thanks for any help on this...



Regards,

Stephen
Message #2 by brian.skelton@b... on Thu, 28 Feb 2002 15:45:34
Stephen



This one had me stumped for weeks!



Any control that expects a RowSource can be set like this:



   EXEC dbo.spName @param1=x,@param2=y,param3=z



(assuming that your SPROC has three paramenters and was created by the db 

Owner)



If a control is expecting a RecordSource then omit the EXEC.



If your parameter values change whilst your database is running, the 

RowSource property can be reassigned.



Brian



> Hello,

> 

> I am using Access 2000 with SQL server back end.

> 

> I build a SPROC in code and return a recordset, i would like to then put 

> the result of the recordset into a combo box. 

> 

> I cannot find an easy way to do this, is there a control that will 

accept 

> stored procs or do i need to run a loop through the recordset and add 

each 

> value manually?

> 

> Thanks for any help on this...

> 

> Regards,

> Stephen

  Return to Index