Options

ADO to SQL Client need Oracle Connection String

jwilderjwilder Member Posts: 263
I am upgrading from NAV 2009 R2 to NAV 2016. I have some processes that used ADO to connect to an Oracle database but in NAV 2106 I am using the dotnet SQLClient to do this. Works fine with SQL connections but can't get it working with an Oracle connection.

Here is what I used in NAV 2009 for the connection string (with ADO):
Provider=MSDAORA.1;Password=mypassword;User ID=myuserid;Data Source=mydatasource;Persist Security Info=True (mydatasource is the odbc connection set up on the machine)

What would the connection string be now that I am sue the dotnet sql client?

Answers

  • Options
    kylehardinkylehardin Member Posts: 257
    What does the error log on the Oracle server show?

    I do not know much about Oracle, but I've done dotnet connections directly to SQL Server before, and it didn't require any ODBC connection information. It looks like this (this is an Active Directory trusted connection):

    Text001 Data Source=%1;Initial Catalog=%2;Integrated Security=SSPI

    ConnectionString := STRSUBSTNO(Text001, MySetup."Sales Import SQL Server", MySetup."Sales Import SQL Database");

    SQLConnection := SQLConnection.SqlConnection(ConnectionString);
    Kyle Hardin - ArcherPoint
  • Options
    jwilderjwilder Member Posts: 263
    I have no problem with sql connections as those are working great but I just can't figure out oracle.
  • Options
    kylehardinkylehardin Member Posts: 257
    A brief search on MSDN found this. Sounds like direct support from DotNet to Oracle isn't staying around long.

    https://msdn.microsoft.com/en-us/library/77d8yct7(v=vs.110).aspx?f=255&MSPPError=-2147217396
    Kyle Hardin - ArcherPoint
Sign In or Register to comment.