0

I'm doing a query on the firebird external database from SQL Server (2008, 2012). The server connects seamlessly to the linked server, but to consult the following error.

ADDITIONAL INFORMATION:

Object reference not set to an instance of an object. (Microsoft.SqlServer.ConnectionInfo)

===================================

You can not run the script.

===================================

Object reference not set to an instance of an object. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
Program location:

   on Microsoft.SqlServer.Management.Common.ConnectionManager.UpdateDatabaseEngineType()
   on Microsoft.SqlServer.Management.Common.ConnectionManager.get_DatabaseEngineType()
   on Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.DebugWrapper.Start()
   on Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.OnDebugScript(Object sender, EventArgs a)

The query worked until a few days ago, but now I get this error. Might be wrong?

this is the query:

SET @QUERYSTRING = 'SELECT @HAST=HASTA, @ABON=ABONOCONTRATO FROM OPENQUERY( CnxAdasysWS, ''SELECT first 1 HASTA, ABONOCONTRATO FROM TBLPAGOS WHERE TM=0 AND ANULADO=0 AND IDCONTRATO ='''''+@NOCONTRATO+''''' ORDER BY IDGENERADOR DESC'')';
EXECUTE SP_EXECUTESQL @QUERYSTRING, N'@HAST DATE OUTPUT, @ABON FLOAT OUTPUT', @HAST=@PAGOHASTAMOVIL OUTPUT, @ABON=@ABONOCONTRATO OUTPUT 

I run the query in SQL management studio and came out the same mistake as I configured the linked server several times, but no error above shows create. Connection test shows no problems

Carlos Lopez
  • 117
  • 2
  • 2
  • 9
  • And have you tried running this query on the SQL management Studio??? You get the same error? Maybe a configuration of the linked server. – bugs2919 Oct 16 '15 at 22:21
  • The error "Object reference not set to an instance of an object." and its stacktrace seems to suggest that something goes wrong inside SQL management studio itself. You might want to try repairing your install of SQL Management Studio. – Mark Rotteveel Oct 17 '15 at 08:28

1 Answers1

0

It's not easy to identify the problem outside of your network. The think I've in mind is verify if the connections between the servers are OK, firewalls servers and security rules.

Try to make a simple select between the servers to be sure that the connections are working well.

Julian Leite
  • 114
  • 1
  • 2
  • 8