Kbase P160516: SQL: ErrNum = 10038 errors executing establishing a DSN-Less connection to an OpenEdge database via
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/02/2010 |
|
Status: Unverified
SYMPTOM(s):
SQL: ErrNum = 10038 errors executing establishing a DSN-Less connection to an OpenEdge database via VB .NET code.
VB.NET client issues several forms of the 'ErrNum = 10038 ' while establishing an ODBC DSNless connection to an OpenEdge 10.1C database.
First error message:
{"ERROR [HY000] ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Unexpected Network Error. ErrNum = 10038 ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Connection refused. Verify Host Name and Port Number. ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed."}
Second error message:
{"ERROR [HY000] ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Unexpected Network Error. ErrNum = 10038 ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Connection refused. Verify Host Name and Port Number. ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Unexpected Network Error. ErrNum = 11001 ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed."}
Third error message:
{"ERROR [HY000] ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Unexpected Network Error. ErrNum = 10038 ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Connection refused. Verify Host Name and Port Number. ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed."}
Code being executed is similar to the following:
Imports System
Imports System.Data
Imports System.Data.Odbc
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myConnectionString As String = ("DRIVER={Progress OpenEdge 10.1C Driver};HOST=172.30.56.158;PORT=23456;DB=sports2000;UID=Administrator;PWD=Progress!2009;DIL=READ UNCOMMITTED;")
Dim MySelectQuery As String = "SELECT Custnum, Name, City FROM PUB.Customer WHERE CustNum < 3"
Dim myConnection As New OdbcConnection(myConnectionString)
Dim MyCommand As New OdbcCommand(MySelectQuery, myConnection)
myConnection.Open()
MsgBox(myConnection.State.ToString)
MsgBox(myConnection.ConnectionString)
Dim myReader As OdbcDataReader = MyCommand.ExecuteReader()
Try
While myReader.Read()
MsgBox(myReader.GetString(0) + " " + myReader.GetString(1) + " " + myReader.GetString(2))
End While
Finally
myReader.Close()
myConnection.Close()
End Try
End Sub
End Class
FACT(s) (Environment):
Windows
OpenEdge 10.x
OpenEdge 10.1x
CAUSE:
The connection string is not correctly constructed:
The first error is generated if the database is started -H localhost or without the -H at all and the HOST value is set to the IP address of the machine.
The second error is generated if the HOST value is set to an incorrect IP address.
The third error is generated if the PORT value is wrong.
FIX:
Ensure that the database is properly started with the -H startup parameter value set to the correct host name that the HOST option of the ODBC DSNLess connection string is the correct IP address or the correct host name.