With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
The Grade of the Solution
The Zone Rank of the Expert Providing the Solution
The Number of Author and Expert Comments
The Number of Experts Contributing
The Feedback of the Community
Your Input Matters Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.
If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.
OK I open VS 2005 and create a new website add a dropdownlist to the wwebpage and call it cboCountries. Then I open the code behind and add Imports System.Data.SqlClient Then in the Form1_Load I add: Dim sConnection As String = "Data Source=REDMACHINE;Initial Catalog=Northwind;User ID=csInfo;Password=csInfo;" Dim sSQL As String = "SELECT DISTINCT Country FROM Customers ORDER BY Country" Dim comm As SqlCommand = New SqlCommand(sSQL, New SqlConnection(sConnection)) Dim dr As SqlDataReader = Nothing Try comm.Connection.Open() dr = comm.ExecuteReader
While dr.Read cboCountries.Items.Add(dr(0))
End While Catch ex As Exception Return End Try dr.Close() comm.Connection.Close()
I run the app and everything works great a dropdownlist is on the page and has all the countries loaded in it. Then I do the exact same thing only this time I use Windows Mobile 6 Professional Device Application. I open VS2005 add a new project and new Windows Mobile 6 Professional Device Application. I add a ComboBox to the device's form, I call it cboCountries. Then I added a Reference to Systme.Data.SqlClient and then added the Imports System.Data.SqlClient to the top of the code behind page. Then I added the same code as above:
Dim sConnection As String = "Data Source=REDMACHINE;Initial Catalog=Northwind;User ID=csInfo;Password=csInfo;" Dim sSQL As String = "SELECT DISTINCT Country FROM Customers ORDER BY Country" Dim comm As SqlCommand = New SqlCommand(sSQL, New SqlConnection(sConnection)) Dim dr As SqlDataReader = Nothing Try comm.Connection.Open() dr = comm.ExecuteReader
While dr.Read cboCountries.Items.Add(dr(0))
End While Catch ex As Exception
Return End Try dr.Close() comm.Connection.Close()
But when I run this I get an error say "The Specified SQL Server not found:REDMACHINE" My computer is named REDMACHINE and both VS2005 and SQL 2000 sit on REDMACHINE. If I change REDMACHINE to (local) I get the error "SQL Server does not exist or access is denied" Please help I don't know what I am doing wrong. Thanks Matt