Navision 4.0 and asp.net

Siong
Siong Member Posts: 3
hi, all i was new to navision. i want to view navision data into datagrid in asp.net 1.x. But i've got problem in connect to odbc drivers.

First i install nodbc and in system DSN and i add microsoft navision database and here is my configuration
data source: Navison
Description : Navision Database
connection : local
Database name : ......./database.fdb
Company name : cronus indonesia pt.
UserID: admin
Password : admin
Option -- identifier : a-z,A-Z,0-9,..
And other i left it with default setting.
Ok, I've one with odbc setup properties

here is my code for aspx in code behind: (in .vb)

Imports System.data.odbc

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ODBCcon As OdbcConnection
Dim odbcStr As String
Dim da As OdbcDataAdapter
Dim ds As DataSet

ODBCcon = New OdbcConnection("DSN=Navision;uid=admin;pwd=admin")
odbcStr = "select * from Contact_Job_Responsibility"
da = New OdbcDataAdapter(odbcStr, ODBCcon)
ds = New DataSet
da.Fill(ds, "Contact")
Label1.Text = ds.Tables(0).Rows.Count.ToString
End Sub

then i've got error server application unavailable...
when i test it with non "OLE DB Provider for ODBC driver", my asp.net works.

And i also make a simple test with access program - nodbc and it works.

when i retrieve data in navision database at vs.net server explorer.. i success to.. but when i drag the table into aspx it says "unable to log into database" ](*,)

anybody know why this doesn't work??????
Thanks..Like to hear the solution :)

Comments

  • coldeyes
    coldeyes Member Posts: 5
    Hi.

    i was just wondering...

    -->Database name : ......./database.fdb

    maybe it's ur database name? i have not tried to connect to a database with an FDB extension.

    If you have the MS SQL server option for navision, try connecting there instead of the "Database name : ......./database.fdb "... i think it's much easier.

    :D

    I'm sorry in advance if this can't help you. :D
  • Siong
    Siong Member Posts: 3
    Hi.. too..

    .fdb is extension for database in navision.
    i know it's much easier if i use ms sql server.. but in my case
    i don't want to use ms sql server... so i just connect to native navision database

    if i don't have any user account in navision .. could this be happened, i mean connect to odbc drivers????

    Thank you...
  • mandyk
    mandyk Member Posts: 57
    Hi dear Siong,
    You got to understand the basic Navision database understanding.
    Native Navision database fdb isn't OLDDB compatible, so you won't be able to treat it as .mdb access alike. [-X
    Nevertheless, Navision providing you 2 ways of
    integration/connectivity:
    1. via CFRONT
    2. CODBC

    CFRONT is API component alike for Navision native or SQL database.
    it's just like ADO kind of thing.
    Meanwhile CODBC is Navision ODBC.
    Everything you need are in Navision installation CD.

    you can e-mail me for further info : andy_kurniadi1973@yahoo.com.sg

    have fun.
  • marco.morreale
    marco.morreale Member Posts: 58
    I experienced the same error: "unable to log into database".

    Did anyone find any solution in the meanwhile?

    I used Navision CODBC 3.70 for long without problems.

    It appears to be a new issue for NODBC.

    M