C/ODBC permission fails from vs 2005 stored procedure

LibertyMountainLibertyMountain Member Posts: 94
I am trying to use stored procedures in Visual Studio 2005 to run my data transformations from NAV c/side to SQL 2005 and I get a permission error everytime the C/ODBC open() is called. ](*,)

Has anyone had any experience with C/ODBC in SQL 2005? I currently have a working console application I would like to convert to the SQL 2005 stored procedure created in Visual Studio because the C# layer runs faster than the T/SQL and certainly faster than my console application.

I can post code if you would like but here is the error message:

Request for the permission of type 'System.Data.Odbc.OdbcPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Comments

  • SavatageSavatage Member Posts: 7,142
    try using the odbc driver that comes with sql - the c/odbc & newer n/odbc are used for connecting to the Native database not sql database

    if you do use c or n/odbc you need to use the same version as the database you are connecting with...3.10,3.6,3.7,4.0
  • LibertyMountainLibertyMountain Member Posts: 94
    I dont have to make a SQL datasource call because I am below the transact level so the SQL connection works fine. It is when I am inside SQL and I make a call TO native Navision using the C/ODBC driver that I get the permission failed error.

    My SQL works fine and my C/ODBC works fine OUTSIDE of SQL (the console application or msquery for example) it is only INSIDE SQL that the C/ODBC call fails.
Sign In or Register to comment.