ASP connection to Navision

marvinqvistmarvinqvist Member Posts: 53
I am a newbie to external programming towards Navision, so I hope some of you can help me out here..

I am trying to create an asp frontend website (not asp.net) which has the ability to connect to Navision and receive respons according to the Navision logics.

I have read a lot of topics and manuals but I am stuck in how to make a query to Navision and have to handle the respons.

I've been looking at som asp.net solutions and have installed Microsoft Application Server and Microsoft Message Queuing... but what is the next step??

I have absolutely no idea of what to do from now on. Have anyone got som code examples on how to create the connection from an asp-site and on how the query and respons handling works.

The Navision database is running as native, not SQL.

Thanks in advance

Comments

  • EugeneEugene Member Posts: 309
    through the use of ODBC drivers ?

    will you need to update data in Navision database or just to read it ?
  • marvinqvistmarvinqvist Member Posts: 53
    Thanx for reply.

    I have thought about ODBC drivers but then I have to duplicate the business logics at the website (Ain't that correct). I would like just to post my queries to Navision and let Navision give me the correct feedback - as if I was using a Navision Client in the company.

    Mostly read-operation, but also some minor write-operations.

    I've seen similar solutions that was dealing with this and worked as explained - but I do not know how to establish the connection.

    Any other solutions??

    /MHQ
  • EugeneEugene Member Posts: 309
    then NAS (Navision Application Server) is the way to go i think
    check this article on msdn
    http://msdn.microsoft.com/en-us/library/ms952182.aspx
    the Introducing the Navision Application Server part of it
  • marvinqvistmarvinqvist Member Posts: 53
    I have installed the Application Server, and the Message Queuing - but then I am lost... I am missing a description on how to connect/send/receive to the MSMQ.

    I have already seen the article you mentioned, but it is in C# not ASP.OLD

    Some kind of code example would really save the day :)

    /MHQ
  • EugeneEugene Member Posts: 309
    the article above explains how to do it from navision side
    to get an idea how to work with MS MessageQueues on ASP side try googling ASP+MSMQ
  • marvinqvistmarvinqvist Member Posts: 53
    Yea, I guess that is the way forward.

    Still if anyone has some code which explains or illustrates this it will help me alot. I will try my luck with google :)

    /MHQ
  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    what you could do is look at the old "Commerce Portal" functionality that was in 3.6->4.0.
    This is written in ASP.

    What they did is, you set your queue names in the registry, then you read the registry in the ASP programs.

    here is an piece of code that sets the queue name:
    ' set up the MSMQ Properties
    Dim oRegReader, MSMQProperties
    Set oRegReader = server.CreateObject("NCPRegreader.Utilities")
    Set MSMQProperties = server.CreateObject("Commerce.Dictionary")
    
    MSMQProperties("SendQueue") =  oRegReader.GetQueueName("Job Queue Label")		' Registry Entry for Send Queu
    MSMQProperties("ReceiveQueue") = oRegReader.GetQueueName("Reply Queue Label")	' Registry Entry for Reply Queu
    MSMQProperties("SendTimeOut") = 3600000	' Send Timeout 3600 secs.
    MSMQProperties("RcvTimeOut") = 3600000	' Rcv Timeout, 3600 secs.
    

    Then they use this later on in the ASP Code to send messages to the queues:
    set qinfo = server.CreateObject("MSMQ.MSMQQueueInfo")
    Set sendq = server.CreateObject("MSMQ.MSMQQueue")
    Set oMsg = Server.CreateObject("MSMQ.MSMQMessage")
    
    ' Get a handle to the MSMQ Queue that we need
    qinfo.FormatName = cQueueLabel
    ' Open the Queue
    Set sendq = qinfo.Open(MQ_SEND_ACCESS, MQ_DENY_NONE)
    

    If you have access to the commerce portal files, please take a look at the following files:
    1. Global.asa
    2. Transport.asp (located in the Include folder)
    3. mq.asp (located in the Include folder)

    I hope this helps you a little,

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • marvinqvistmarvinqvist Member Posts: 53
    Thanks...

    I seems from your answer that the asp site has to be local... ain't it possible to have the website hosted elsewhere?? Can I declare an IP or something to make it external (physicaly)


    /MHQ
Sign In or Register to comment.