I don't believe I'm using IP connections in the code.
This is the code I use to run the query:
' Get the EMPLOYEE_VW connection from the DataConnections collection.
Dim myEMPLOYEE_VW As AdoQueryConnection = _
DirectCast(Me.DataConnections("EMPLOYEE_VW"), AdoQueryConnection)
' Change the SQL command for EMPLOYEE_VW connection to retrieve
' the record of the Username from the current user.
myEMPLOYEE_VW.Command = "select * from [EMPLOYEE_VW] where [COMPUTER_USERNAME] = upper('" + CUser + "')"
' Execute the updated command against the data connection to refresh the data.
myEMPLOYEE_VW.Execute()
I added the data connection through the data connection wizard, selecting Microsoft SQL Server.
The trust level is set to automatic, and while grayed out it has Domain Highlighted.
The weird thing is it works when I preview it but not when it's published.