**
Stephen,
Assuming you want to execute a SQL command using your .NET API program. If so, you need to make use of ARSystem.Server.GetListSQL method. It accepts a valid SQL command string and does its thing.
DirectSQLAction is not in play for this use case.
However what you really want to do is - you have an AL with this direct SQL action in it (and) you want to run it ---> then you'll have to do a GetActiveLink to get at the definition, then grab the SQL command, substitute values for any field/keyword embedded in its text, then issue the GetListSQL command just as above.
In case, if your attempt is actually to create an AL itself (with an DirectSqlAction in it) - I would say this : .NET API does not fare quite well in object creations at this time. So I will suggest you to use C/Java APIs or import definition type of activity within .NET API rather than server.CreateActivelink function.
Regards
Appajee Papolu
From: Action Request System discussion list(ARSList) [mailto:arslist@arslist.org] On Behalf Of Heider, Stephen
Sent: Wednesday, January 11, 2006 8:52 AM
To: arslist@arslist.org
Subject: .Net API - DirectSQLAction
How do you execute a SQL command with DirectSqlAction?
I may have overlooked the reference, yet I have searched the API help, API readme.doc, API samples, ARSList, Remedyweb and the ARS 6.3 documentation but did not find an example or syntax to execute the command.
Here is the DirectSqlAction object being created:
Dim dSQL As New ARSystem.DirectSqlAction
dSQL.Command = "EXEC myStoredProcedure '" & ParamValue1 & "', '" & ParamValue2 & "'"
dSQL.Server = "remedy"
Does anyone know the syntax?
Thanks.
Stephen
This posting was submitted via the Web interface This posting was submitted via the Web interface