Stored procedures

Hi, is there any possibility to use a stored procedure inside Navision, that is declare it as some kind of variable and then call on like an ocx control? If not is there any change with Attain? Best regards Daniel

Hi Daniel, if I understand you correctly, there is the possibility to write a procedure and store it as a codeunit. You can write functions (so called triggers in NAVISION) ‘inside’ this codeunit and call this codeunit/function from each program, where you need it, also by passing variables to the triggers. Michael

Hi You can create an OCX to call a stored procedure. It is as easy as you just said. 1) Create an OCX control in VB to call a stored procedure. 2) Define Navision variable as OCX type, subtype as our control. 3) run Variable. You can pass variables between Navision and the OCX if you need to. Paul Baxter

If you talking about Navision on MSSQL, then you cannot call SP directly from Navision. You can use SQLDMO library from SQL Server Client Tools or ADO (ODBC_DSN+ADO) to run some query. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Thanks for the replies! I will try making a OCX. That seems to be the solution I was looking for. Best regards Daniel

Hi Daniel, Another option to an OCX or ActiveX component would be to use ADO Command, Connection and RecordSet objects from within Navision. Depending on what you are doing this might be just as easy or easier than creating the ActiveX. Just another option. Bill