B
Bart Schelkens
Hi,
i have this website which connects to an Access-database.
I've made 2 local copies : 1 on a Win2000 and 1 on a Win XP.
When I start the site on my Win2000 I don't have any problem.
When I start the site on my Win XP I seem to have problems with my
connection to my database.
I've written a fucntion ExecuteSQLString to get a datareader from my
database .
Apparently when I get the error, it is on the line that says :
lconAdministration.Open.
At the time I get the error, I check my connectionstate and it says that is
closed.
Can anyone help me?
Thx
Public Function ExecuteSQLString(ByVal vstrQuery As String) As IDataReader
Dim lconAdministration As IDbConnection = GetConnection()
Try
Dim lcomInfo As IDbCommand = lconAdministration.CreateCommand
lcomInfo.CommandType = CommandType.Text
lcomInfo.CommandText = vstrQuery
lconAdministration.Open()
Return lcomInfo.ExecuteReader
lconAdministration.Close()
lconAdministration = Nothing
Catch ex As Exception
Throw
End Try
End Function
i have this website which connects to an Access-database.
I've made 2 local copies : 1 on a Win2000 and 1 on a Win XP.
When I start the site on my Win2000 I don't have any problem.
When I start the site on my Win XP I seem to have problems with my
connection to my database.
I've written a fucntion ExecuteSQLString to get a datareader from my
database .
Apparently when I get the error, it is on the line that says :
lconAdministration.Open.
At the time I get the error, I check my connectionstate and it says that is
closed.
Can anyone help me?
Thx
Public Function ExecuteSQLString(ByVal vstrQuery As String) As IDataReader
Dim lconAdministration As IDbConnection = GetConnection()
Try
Dim lcomInfo As IDbCommand = lconAdministration.CreateCommand
lcomInfo.CommandType = CommandType.Text
lcomInfo.CommandText = vstrQuery
lconAdministration.Open()
Return lcomInfo.ExecuteReader
lconAdministration.Close()
lconAdministration = Nothing
Catch ex As Exception
Throw
End Try
End Function