Hi,
I want to query a database in my webservice. but when i use either an ODBC or an OleDB connection, an "Internal Server Error 500" raises when i open the connection.
This is the Code:
<WebMethod()> _
Public Function opendb() As Boolean
Dim oConn As New Odbc.OdbcConnection
oConn.ConnectionString = "DSN=EPO;Uid=;Pwd=;"
oConn.Open()
'do database stuff
oConn.Close()
Return True
End Function
I get an "Internal Server Error 500" at the following line:
"oConn.Open()"
I copied the function to an standard windows application (.exe), and the function worked without problems. (So the DSN exists and works)
When i use the "SqlClient.SqlConnection" object, and connect to an MS SQL database on the Server (using an other connectionstring) there's no error
Can anyone help me or does anyone has the same problem???
I want to query a database in my webservice. but when i use either an ODBC or an OleDB connection, an "Internal Server Error 500" raises when i open the connection.
This is the Code:
<WebMethod()> _
Public Function opendb() As Boolean
Dim oConn As New Odbc.OdbcConnection
oConn.ConnectionString = "DSN=EPO;Uid=;Pwd=;"
oConn.Open()
'do database stuff
oConn.Close()
Return True
End Function
I get an "Internal Server Error 500" at the following line:
"oConn.Open()"
I copied the function to an standard windows application (.exe), and the function worked without problems. (So the DSN exists and works)
When i use the "SqlClient.SqlConnection" object, and connect to an MS SQL database on the Server (using an other connectionstring) there's no error
Can anyone help me or does anyone has the same problem???
Last edited: