Using a databaseconnection -> Internal Server Error

zjen

New member
Joined
Feb 16, 2005
Messages
3
Programming Experience
3-5
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???
 
Last edited:
Ok, I tested a little bit more with the SqlConnection object.

If I try to connect the database with "NT Authority" i get the same Internal Server Error message. If I connect with a database-user, it just works fine without errors.

Is it so that an ODBC and OleDB object also connects at NT level, instead of user level?

i'm going to test a little bit more, you'll hear from me. (Not that anyone is reading this, i quess, but anyway...)
 
Back
Top