Execute a Stored Procedure??

jonkar
Member Posts: 13
We are currently running Navision 3.7 on SQL Server 2000.
I would like to know if it is possible to execute a stored procedure from a Trigger in C/Side?
Thanks,
J.
I would like to know if it is possible to execute a stored procedure from a Trigger in C/Side?
Thanks,
J.
0
Comments
-
well you can trigger your stored procedure on insert of a record. From navision all you do is insert a record and it'll trigger your stored procedure.
The other option is use COM object to connect to sql and execute your stored procedure. There are a couple of threads on this subject. Searching would help.0 -
I think you are telling me how to run Navision Code created with C/Side???
What I want to run a Stored Procedure within "SQL SERVER 2000" not in Navision.
When running a SQL SERVER stored procedure it is executed on the SERVER, when you run a trigger in Navision it is executed on the Client....
So I need to be able to tell SQL Server, from C/SIDE to execute a Stored Procedure that I created in "SQL Server Enterprise Manager".
Thanks,
J.0 -
Using an ADO Connection object open it first with the relevant connection string and then pass the name of the stored procedure and execute:
ADO_Connection.Execute({sp name});
You can pass parameters but if you want return values then you probably will have to use the ADO command object.
Hope this helps.0 -
How do I use ADO? I need detailed explanation of how to execute stored procedure from Navision. I can access my stored procedures through SQL Query Analyzer but I need to execute them from Navision.
What do I need to do?0 -
Name DataType Subtype Length conn Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Connection
CREATE(conn); conn.Open('Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=[Servername];Data Source=[Databasename]'); conn.Execute('EXEC StoreProcedureName'); conn.Close; CLEAR(conn);
Hope it helps.Regards,
Peter Ng0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions