Options

Multi Connections via C/ODBC ?

Jem_AhmetJem_Ahmet Member Posts: 27
edited 1999-12-16 in Navision Financials
I'm trying to transfer TableData between 2 Databases via ODBC , but I can not connect to 2 different DSN via ODBC.
Is there any solution?

Comments

  • Options
    BennyGiebensBennyGiebens Member Posts: 43
    The only solution to my knowledge is to go via C/front.
    We have made a VB program for internal use, that uses any odbc source as an input and a navision table as output.

    Its the same as a dataport, with the exception that we can import directly from excel, access, Notes etc..... without having to convert to ascii file first.

    Rgds
    Benny Giebens
    Rgds
    Benny Giebens
  • Options
    dbdb Member Posts: 82
    I don't think that good idea connect databases using ODBC, becouse it is slow. Did you can write to database by ODBC ?

    If you need connect two databases once per mounth:
    Create new databese & using copy/paste transfer data. This is cheepest & simplest way.

    If you need funcionality & speed or joining every day use replicating soft. There is a lot of choises. I have maded solution like this in C++.
  • Options
    Jem_AhmetJem_Ahmet Member Posts: 27
    I have a database (with data) and other database (empty) but with renumbered objects -
    want to transfer data from db with OLD numbers to db with new numbers.
  • Options
    dbdb Member Posts: 82
    If renubered only obj not fields there no problems from my program view. If renumbered fields this or field type there can by some problems. That for you are using new db ?
  • Options
    hreinnhreinn Member Posts: 8
    Is this a one off project ?
    If so just use a Dataport.
  • Options
    dbdb Member Posts: 82
    You can't connect to db, because then your connection runs dbm.dll it locks API (fin.exe, ODBC or CF) to fdb. This is maded by NF for forbiding fdb share. Simple example:
    Try to run two fin.exe with diferent db. You can run same install, you need two installs of fin. The same thing with CF & ODBC.

    In your case I think the best solution can be:
    In new db make table with the same fields.
    Transfer to this table data from old db.
    Use C/AL make data transfer / conversation to others tables. If you will try to use CF you will meet trouble doing operations with some data types. Keep in mind that CF not strong in error detection, you must care about it by self. Don't forget all in win32 API all API's uses the same copy of dll, all NF dll's is one API oriented, they don't care that you calling from diferent API. Everywhere where you entering NF dll use mutexes or semaphores. There are many thin things.

    The best result I was received then used structure & used two PC:
    [fdb connector]<->[own TCP module]<- WAN /LAN ->[own TCP module]<->[fdb connector]
  • Options
    Jem_AhmetJem_Ahmet Member Posts: 27
    I have Objects renumbered and Fields renumbered too.

    I cannot use dataport because existing fields are reordered - i have to manually design each tables data fields in first and in second database - very complex solution.

    I have tried using ODBC connection and CFRONT connection together - but same problem occured when connecting to 2 different databases, caused exception in dbm.dll.
Sign In or Register to comment.