-1

Currently we use a windows 2003 (IIS 6.0) server with SQL Server 2008 R2 that runs perfectly a asp classic code. We are migrating to windows 2016 server with the same version of SQL Server. In most of the code it was necessary to put the full database path. The original that works on the other server, e.g.:

SELECT * from File

when changing to

SELECT * from [TABLE].[dbo].[File]

the new server can execute and read correctly.

In the part that the code itself has the legible queries is easy to understand. I do not know the asp classic well and the original code has variables with the same table name so I do not know if the called code item is actually the table or the variable.

I think it's something from the environment to set up. Would it be possible to resolve this without having to change the whole code?

I try to understand the error from logfile from IIS.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Maybe someone have the same situation, I solve this change the DSN connection (ODBC) in the code to: Connection.Open "Provider=SQLNCLI10;Server=nameserver\nameinstance;Database=namedatabase;UID=sa;PWD=password1234;" – testerlinguagem Dec 18 '17 at 14:56
  • 4
    If you solved this please post a self answer, don't just add "SOLVED" to the title, it is pointless and unhelpful. – Shadow The GPT Wizard Dec 19 '17 at 10:33
  • 1
    @ShadowWizard, thanks for feedback. I'm newbie here and in 12/18 I just post a comment with the answer. My mistake, just fixed now. Thanks again! – testerlinguagem Dec 24 '17 at 20:55

1 Answers1

1

Maybe someone have the same situation, I solve this change the DSN connection (ODBC)

Dim rs
Dim conexao

Set conexao = Server.CreateObject("ADODB.Connection")
conexao.Open "DSN=database","sa","password1234"

I change the last line to use Provider too like example:

conexao.Open "Provider=SQLNCLI10;Server=nameserver\nameinstance;Database=‌​namedatabase;UID=sa;‌​PWD=password1234;"