Linked Server

CHRISPPYCHRISPPY Member Posts: 4
edited 2005-11-08 in Navision Financials
HELLO!!
In Sql Server I have a problem setting up a linked server to the navision DB using C\ODBC.

i can read data,
select * from OPENQUERY(SERV,'SELECT * FROM TEMP_REFERENCIA')
runs ok

but statement insert like this is bad.
INSERT INTO OPENQUERY(SERV,'SELECT * FROM TEMP_REFERENCIA')
(REF_IDENTIFICADOR,REF_ID,REF_NOMBRE,REF_ALIAS,REF_TELEFONO,REF_FAX,REF_URL,REF_SEC_ID,REF_EST_ID,REF_USU_ALTA,REF_USU_MODIF,REF_FALTA,REF_FMODIF,REF_FBAJA,REF_BLOQUEADA,REF_NIFCIF,REF_TRATADO,REF_FTRATADO,REF_TACCION)
SELECT 1,REF_ID_NAVISION, REF_NOMBRE,REF_ALIAS,REF_TELEFONO,REF_FAX,REF_URL,'0005',REF_EST_ID,REF_USU_ALTA,'ARSALES','28/07/2005','28/07/2005','28/07/2005',0,REF_NIFCIF,0,'01/01/1900',0
FROM arsales.arsales.referencia
WHERE REF_ID='REF1'

it returns isam error.
El proveedor OLE DB 'MSDASQL' informa de un error.
[OLE/DB provider returned message: [Navision Software a/s][Navision Financials ODBC Driver]ISAM error]
Traza de error de OLE DB [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005: ].

Please help me!!

Comments

  • CHRISPPYCHRISPPY Member Posts: 4
    What i'm trying to do is insert rows from sql server to navision linking servers
    If you can help me do it, please.
    :cry:
    Thanks.
  • bbrownbbrown Member Posts: 3,268
    Enumerate your field list in the openquery statement.
    There are no bugs - only undocumented features.
  • ibrahimovicibrahimovic Member Posts: 4
    Hello everybody !

    I have the same problem. Navision DataBase linked with Microsoft SQL Server via ODBC Driver.

    Select and update works.

    But when i try this :
    DBCC TRACEON(8765)
    
    INSERT OPENQUERY(NAVISION,'SELECT User_ID FROM "User_"')
    VALUES('devz')
    

    I get this ](*,) ](*,) ](*,) :
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    Serveur : Msg 7399, Niveau 16, État 1, Ligne 3
    OLE DB provider 'MSDASQL' reported an error.  
    [OLE/DB provider returned message: [Microsoft Business Solutions ApS][Microsoft Business Solutions-Navision ODBC Driver]ISAM error
    ]
    OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005:   ].
    

    Have you an idea ?! #-o

    Thanks !
Sign In or Register to comment.