C/Front - connection to SQL Server 2000

vzdesicvzdesic Member Posts: 9
Hello,
I cannot connect to SQL Server 2000 database from Excel -> C/FRONT Add-In - (CFRONT.XLS file) which comes initially with Navision SDK...
Any suggestions???
Vedran

Comments

  • prasslprassl Member Posts: 24
    Hello Vedran,

    maybe, I understood your problem wrong, let's see...
    Your NAV Db is located on a SQL 2000 server, and you are trying
    to connect to it (and retreive data) from Excel ?

    In this case you don't need C/FRONT, setting up an ODBC Connection (DSN) is all you need to do.
    Use Excels data functions to import external data and specify the connection you created. This is, I guess, the easiest way...

    hope that helps
    if it doesn't, please give more details about what you are trying to do..

    cheers, m. :)
    ... I am not a programmer, I just write code.
  • vzdesicvzdesic Member Posts: 9
    This Add-in has some functionality for import Budget to Navision from Excel. I would like to use this - if I could connect...
  • Joe_LittleJoe_Little Member Posts: 45
    There are a couple of issues with this, depending on which version/hotfix you are using. You might want to check with MS support and/or make sure that you are on the most current version of SP2.

    Also, there was, at least at one point, a problem with the macros inside of the cfront.xls file itself. You can open it and see if it contains the CF.SetNavisionPath function before the CR.ConnectServerandOpenDatabase call. If not, you'll need to add it and specify the path to the fin.exe.

    Good luck. :D


    Sub OpenDatabase(NavisionServer As Boolean, _
    ServerName As String, _
    DatabaseName As String, _
    NTAuthentication As Boolean, _
    UserID As String, _
    Password As String)
    Dim ServerType As String
    SetCF
    If NavisionServer Then
    ServerType = "NDBCN"
    Else
    ServerType = "NDBCS"
    End If

    >> Is this here ?
    Call CF.SetNavisionPath ("c:\program files...")
    >> end


    Call CF.ConnectServerAndOpenDatabase(ServerType, ServerName, _
    gstrNettype, DatabaseName, 10000, False, NTAuthentication, UserID, Password)

    If CF.LastError <> 0 Then End
    End Sub
  • vzdesicvzdesic Member Posts: 9
    It works with SetNavisionPath. Thank you very very much !!!
Sign In or Register to comment.