Options

C/FRONT (.NextTable function)

jmlozaresjmlozares Member Posts: 110
I'm accesing a database from a server The connection goes well and I am able to access table and all that.

I've tried using the ".NextTable" function, but it wasn't able to achieve what it supposed to do.

I've wrote the code as:
a = Cfront1.NextTable(0)

Such code should return the table number of the very fisrt table in the database, but it didn't.

Please somebody help... :)
Janderol Lozares Jr.
Manila, Phils.

Comments

  • Options
    dick11dick11 Member Posts: 60
    It works at my PC....

    What is your error message?
    Can you give us your complete part of code?
    Dick van der Sar

    www.dasautomatisering.nl
  • Options
    jmlozaresjmlozares Member Posts: 110
    I haven't encountered any error, rather, it just returned 0.
    Janderol Lozares Jr.
    Manila, Phils.
  • Options
    dick11dick11 Member Posts: 60
    Okay then please show us your code.

    + next questions: Are you using the ocx / enviroment. Mine : direct access to cfront.dll / Visual Studio 2003 C Sharp
    Dick van der Sar

    www.dasautomatisering.nl
  • Options
    jmlozaresjmlozares Member Posts: 110
    I have done my program in VB6, I have added the c/front ocx. After the ".NextTable" statement, i have retrieved the .GetErrorText and returned: "F: Not Implemented"

        Dim a as Long
       
        With CFront1
                
            .ConnectServerAndOpenDatabase("", _
                                0.0.0.0:0, "tcp", _
                                "", 10000, True, False, _
                                "User", "Pword")
    
            .OpenCompany "Cmpany"
    
            Msgbox .NextTable(0)
            Msgbox .GetErrorText
    
        End With        
    
    
    Janderol Lozares Jr.
    Manila, Phils.
  • Options
    dick11dick11 Member Posts: 60
    I have copy/paste it in VB6. But it would not compile.
    I have change to:

    Option Explicit

    Sub dd()

    Dim Cf As New CFRONTLib.CFRONT
    Call Cf.ConnectServerAndOpenDatabase("", "myserver", "tcp", "", 10000, True, False, "me", "secret")
    Cf.OpenCompany ("my company")
    MsgBox Cf.NextTable(0) ' Returns 3

    End Sub


    And it works.

    The error you got is correct: 'the function ".GetErrorText" does not exist'. My compiler did complain about that

    BW: I use NF 3.60
    Dick van der Sar

    www.dasautomatisering.nl
  • Options
    jmlozaresjmlozares Member Posts: 110
    Would you mind If I give you the copy of my source code? I've done the same thing as you do but still the .NextTable returns 0.
    Janderol Lozares Jr.
    Manila, Phils.
  • Options
    dick11dick11 Member Posts: 60
    You’ve Got Mail
    Dick van der Sar

    www.dasautomatisering.nl
  • Options
    visgoldvisgold Member Posts: 21
    Hi

    I am doing the same thing but with ASP as i am not using dsn but want to connect with conn string and getting error once that db coundn't found and second time that ISAM not found

    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open "C:/db/test.fdb"
    set rs = Server.CreateObject("ADODB.recordset")
    rs.Open "Select * from ADOTable", conn

    Can u suugest me where is the error in thiis coonection string as i can access data in asp from MS Access (*.mdb) but not from Navision DB table


    Thanks in advance

    Vishal
Sign In or Register to comment.