Options

vb apps with navision sql database

triciaallisontriciaallison Member Posts: 20
I have some vb apps that run outside of Navision. I was thinking about creating new tables in my Navision SQL Database, and repointing my vb programs to use these new tables. Navision would never update them, but I might have some forms or reports to read the data only. Has anyone ever done anything like this, or know of any reason I should stay away from doing this?

Thanks!

Comments

  • Options
    g_dreyerg_dreyer Member Posts: 123
    Your applications tables do not need to be in the Navision SQL Database, but needs to be on the same server.

    So what you do is use MSSQL Enterprise manager to create a view in you Navision database, let's say v_vbapp_table1.

    Open Navision, create a new table (call it v_vbapp_table1), create the fields exactly as in your view. You are not allowed more fields.

    View the properties of a blank line, set the property LinkedObject = true.

    Save your table and you should be able to see the data when your run the table.

    Regards,
    gus
  • Options
    visgoldvisgold Member Posts: 21
    Hi

    I am doing the same thing but with ASP and getting the error as im not using DSN can u suggest me the connection string to access navision table using asp if i write code in asp.

    Thanks in advance

    Vishal
  • Options
    WaldoWaldo Member Posts: 3,412
    Here are some links:

    http://www.connectionstrings.com/

    For creating a view and using it in Navision, you could use the Application Designers Guide (cfr eromein):

    http://members.home.nl/eromein/adg/w1w1adg.zip

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Options
    visgoldvisgold Member Posts: 21
    Hi

    Thanks for ur reply but i have seen that site but couldn't find the connection string to neter into Navision DB as i am getting error in asp as
    for this codding
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open "C:/db/test.fdb"

    Error Type:
    Microsoft JET Database Engine (0x80004005)
    Unrecognized database format 'C:\db\test.fdb'.


    Error Type:
    Microsoft JET Database Engine (0x80004005)
    Could not find installable ISAM.


    Pls Suggest

    Vishal
  • Options
    WaldoWaldo Member Posts: 3,412
    I thought you had a MS SQL Server, but it seems you have a native Navision database... .

    When connecting to a native ... forget the views! this is not possible. And you'll need C/ODBC (the odbc driver for connecting to a navision native database).

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Options
    visgoldvisgold Member Posts: 21
    Hi

    Thanks

    Thats true i m using native db and even if i use DSN in system dsn as navision it is also not working . i don't know why as i am using this code
    can u pls tell me what is the error now in this coding

    <%
    myDSN="DSN=Navision"

    set conn=server.createobject("adodb.connection")
    conn.open myDSN

    mySQL = "SELECT * from item"
    response.write mySQL & "<br><br>"

    set rstemp=conn.execute(mySQL)

    If rstemp.eof then
    response.write "No data found!<br>"
    else
    response.write "<table border=""1"" style=""font-family: Verdana; font-size: 10pt"">"
    response.write "</font>"
    rstemp.movenext
    loop
    end if

    rstemp.close
    set rstemp=nothing
    conntemp.close
    set conntemp=nothing
    %>
  • Options
    WaldoWaldo Member Posts: 3,412
    I wouldn't know what the problem is. May be case sensitive?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.