VS 2005 : how do you update dataset source without sql server connection
I have an existing project written in VB.NET using Visual Studio 2005 communicating开发者_如何学JAVA to a SQL Server 2005 database. The database was migrated to a sql server 2008 r2 on a different physical server so the dataset's server name needs to be updated. I do not have access to the database anymore. is there a way to just update the server name without invoking the dataset wizard and requiring a connection to the database?
thanks in advance
UPDATE: I tried to created a new project with just a button with the command calling the following subroutine to test the connection from a windows app to the sql server database. here is the sub:
Public Conn as New ADODB.Connection
Public Sub PubSubConnectToDB()
Conn.Open("Server=w2k54\newdb; Database=Subscribers;","kuser", "Pass5555")
end sub
the error i receive is
COM Exception was not handled : [DBNETLIB][ConnectionOpen( Connect()).]SQL Server does not exist or access denied.
I am able to created a system dsn on the same server with the same credentials and test the connection successfully. any ideas? thanks in advance
You could modify the server name in the connection string. Normally this should be located in your App.config.
精彩评论