Technical support This forum is closed.
Version 1.x > Technical support > How to call a query pr storeprocedure defined in Kentico View modes: 
User avatar
Member
Member
me2u - 8/19/2005 8:23:35 AM
   
How to call a query pr storeprocedure defined in Kentico
Dear KEtico or who can help

How can i call a store procedure from within my code that is declared in a section News in Kentico.

Let say Proc_MyStoreProcedure... And please if you're willing to help me and are from Kentico don't give me the answer like you did seceral times ago look in the manual because you're manual is not all that without proper examples and the example you gave me in you're manual the only example i can find that looks a bit like the answer does not work.

this is you're example and does not work where is the definition for treeprovider and when i make a definition the property does not exists.

Treeprovider.GeneralConnection.ExecuteQuery

Where and how do you define it...


Thanx in advance...


Mike


User avatar
Guest
admin - 8/22/2005 5:08:54 PM
   
Re: How to call a query pr storeprocedure defined in Kentico
Hi,

you need to add Import Kentico.CMS.TreeEngine and then use the following code:

dim tree as TreeProvider = Functions.GetTreeProvider()
dim ds as DataSet = tree.GeneralConnection.ExecuteQuery("... query name ...", params)

The query needs to be specified in the CMSDesk -> Development -> ... unfold some document template ... -> Queries.

Should you need some details, please feel free to contact me.

Best Regards,