Does anyone have experience working with automation in Navision. Specifically, I am trying to execute an SQL Server stored procedure using the ‘command’ object of the Microsoft ActiveX Data Objects Library. According to the C/AL symbol menu, this takes a string for an argument, according to VB it takes a connection object. However neither work because when I try to compile, the compiler tells me I need an INTEGER! Any help would be appreciated… Thanks.
I have done some work with this. But i am using the Microsoft SQLDMO Object Library’.SQLServer object here are some sample code. Declare a variable of type automation called sqlserver Declare a variable of type text called commandtxt CLEAR(sqlserver); CREATE(sqlserver); sqlserver.Connect(‘my server’,‘sa’,‘mypassword’); CommandTxt :='EXECUTE mydatabase.dbo.‘myprocedure’; sqlserver.ExecuteImmediate(CommandTxt); CLEAR(sqlserver); Good luck
Thanks Inge, I will try to find the type library for SQL Server as I am having no luck with the command object. It’s interesting that all the other objects in this library seem to work…
I also did a project using the SQLDMO library. It does work, with it I was able to INSERT, MODIFY, DELETE records in a SQL Database from Navision Financials 2.00 (Native) Please note : that the SQLDMO Automation is installed after you have installed a Microsoft SQL Client in your PC
Thanks Tarek, It does seem that it will work, however I’m getting an error msg stating that I need to upgrade my library to SQL2000. I will locate the client and install. It should be the fix I’m looking for. Thanks to everyone for your input.