Every once in a while one of my programs will stop responding while trying to read data from a database. If I hover the cursor over the connection variable & expand the properties, it says "Property evaluation failed" for all properties. Can anyone tell me what this means or what might cause this to happen? Thanks...
It seems that the message you are getting has to do with the CLR and possibly having an overextended parameter somewhere along the way. Check the size of the data that you passing not only into the sub/function, but also the length of your command string (not connection string). It is not fixable within 2008 that I have seen, although it has been reported......repeatedly!
My suggestion it go back to something simpler like "Select Top 10 * From [TableName]" and see if you can reproduce it. Also, if you are passing a large string (like 25000 characters), try using like a stringbuilder object instead OR build your string in your sub/function.
Hope that helps a little!!
D
Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP
Please Rate If I helped you.
Please remember to mark threads as closed if your issue has been resolved.
Here's the code, but I really don't think the problem is here:
Code:
Using con As New Odbc.OdbcConnection(MyConnectionString)
Using cmd As New Odbc.OdbcCommand("", con)
cmd.CommandText = queryString
con.Open()
Try
Using myData As Odbc.OdbcDataReader = cmd.ExecuteReader()
While myData.Read
'do something here with the data
End While
End Using
Catch ex As Exception
End Try
End Using
End Using
The query itself is fairly simple ... "Select * from [table] where [something] = [something]". Generally it should return less than 100 results.