Thanks for replying. Here's a method that I put together just to keep all of the related code together to make it easier to read. If I use the connection string that I created using a SQLConnection object, it works just fine. The connection string is stored in an INI file.
Any ideas? Thanks,
Paul
Public Sub GetID()
Dim SQLConnection As New SqlClient.SqlConnection()
Dim SQLConnectionString As String
SQLConnectionString = "LocalServer"
'The error occurs trying to assign the DSN name to the
'ConnectionString property
SQLConnection.ConnectionString = SQLConnectionString
SQLConnection.Open()
'other code...
SQLConnection.Close()
End Sub