Insert / Update Fails with ADO.NET

karunakarankarunakaran Member Posts: 3
edited 2006-06-30 in Navision Attain
Hi,

I am very much new to Navision.
I'm trying to update a table from my windows application (.NET 2.0). I'm not able to insert or update, But I'm able to select the values.

I get an error stating Driver does not support this function.

This is the code
OdbcDataReader objdrRecCount;
strSql = "Update Currency_Exchange_Rate SET Exchange_Rate_Amount = " + Exchange_Rate_Amount + " WHERE Currency_Code = '" + strCurrencyCode + "' AND Starting_Date = { d '" + strXMLFeedDate + "'}";
objCmd = new OdbcCommand(strSql, objConn);
objConn.Open();
objCmd.ExecuteReader();

I'm struggling with this for almost 2 days now, any help is appreciated.

Thanks
KK

Thanks

Comments

  • ara3nara3n Member Posts: 9,255
    Is the db native or SQL? If it's sql don't use ODBC. The ODBC connection for native navision is limiited and was not fully implemented.
    Instead use CFront.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • karunakarankarunakaran Member Posts: 3
    its the native db, not sql.
    the weird thing however is, i noticed that it does insert / update the records :D but also throws the above said exception :-k

    this is driving me nuts.... ](*,)
Sign In or Register to comment.