Strange problem with nvarchar(max) fields and Classic ASP

前端 未结 7 1145
猫巷女王i
猫巷女王i 2020-12-04 03:07

I\'m working on a Classic ASP (VBScript) site that\'s running on a Windows 2008 server with IIS7 and hitting a SQL Server 2008

7条回答
  •  情话喂你
    2020-12-04 03:49

    Very old thread - admitted. But I had this issue and it was driving me INSANE.

    I fixed this by changing my connection string like this:

    objConn.Open "Driver={SQL Server}; Server=(local); Database=; Uid=sa;Pwd=sa;"
    

    to:

    objConn.Open "Provider=SQLNCLI; Server=(local); Database= ; Uid=sa;Pwd=sa;"
    

    So, essentially, removing Driver={SQL Server} and adding in "Provider=SQLNCLI;", FIXED THIS.

    I can now see the nvarchar(max) column displayed correctly in my Classic ASP page.

    Hope this helps someone.

提交回复
热议问题