i cant tell really what the problem is but i get the following error oe ex.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Try
            Dim Connection As New Data.SqlClient.SqlConnection("C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\LugWdLib\LugWdLib\lugthes_source.sdf")
            Dim Command As New SqlClient.SqlCommand    ' declare a command to select from the database
            Dim sqlselect As String
            If (Connection.State = ConnectionState.Closed) Then ' open the connection to the database
                Connection.Open()
            End If

            'connecting to database to seek for data
            Command.Connection = Connection
            sqlselect = "SELECT* FROM test WHERE id='" & writetext.Text & "'"   'command to search a word from the database

            Dim check As System.Data.SqlClient.SqlDataAdapter = New System.Data.SqlClient.SqlDataAdapter(sqlselect, Connection)
            Dim lugthes_source As DataSet = New DataSet()

            check.Fill(lugthes_source, "word_name")
            Dim numRow = lugthes_source.Tables("word_name").Rows.Count()




            If (numRow > 1) Then
                ListView1.Columns.Add("Ekigambo")
                ListView1.Columns.Add("Kyekitegeeza")
                ListView1.Columns.Add("Word")
                ListView1.Columns.Add("Translated meaning")
                ListView1.Columns.Add("Category")
            Else
                MessageBox.Show("temuli kigambo")
            End If
            While (numRow > 0)
                Dim item As ListViewItem = ListView1.Items.Add(lugthes_source.Tables("word_name").Rows(0).ItemArray.GetValue(0).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(0).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(1).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(2).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(3).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(4).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(5).ItemArray.GetValue(1).ToString())


            End While



        Catch ex As Exception
            MessageBox.Show(ex.Message)
            If (Connection.State = ConnectionState.Open) Then ' closes the connection to the database

            End If
            Connection.close()

            Cursor.Current = Cursors.Default

        End Try

        If writetext.Text() = "" Then
            MessageBox.Show(" You can't continue when the box is empty. PLease insert a word you want to search.")
            Return
            meaning.Show()
        End If
       


    End Sub

i get this error massage format of the initialization string does not conform to specification starting at index 0

please i have a problem with this code i get an error massage which says
format of the initialization string does not conform to specification starting at index 0

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Try
            Dim Connection As New Data.SqlClient.SqlConnection("C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\LugWdLib\LugWdLib\lugthes_source.sdf")
            Dim Command As New SqlClient.SqlCommand    ' declare a command to select from the database
            Dim sqlselect As String
            If (Connection.State = ConnectionState.Closed) Then ' open the connection to the database
                Connection.Open()
            End If

            'connecting to database to seek for data
            Command.Connection = Connection
            sqlselect = "SELECT* FROM test WHERE id='" & writetext.Text & "'"   'command to search a word from the database

            Dim check As System.Data.SqlClient.SqlDataAdapter = New System.Data.SqlClient.SqlDataAdapter(sqlselect, Connection)
            Dim lugthes_source As DataSet = New DataSet()

            check.Fill(lugthes_source, "word_name")
            Dim numRow = lugthes_source.Tables("word_name").Rows.Count()




            If (numRow > 1) Then
                ListView1.Columns.Add("Ekigambo")
                ListView1.Columns.Add("Kyekitegeeza")
                ListView1.Columns.Add("Word")
                ListView1.Columns.Add("Translated meaning")
                ListView1.Columns.Add("Category")
            Else
                MessageBox.Show("No record found. Check spelling or search another word.")
            End If
            Dim p As Integer = 0
            While (numRow > p)
                Dim item As ListViewItem = ListView1.Items.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(0).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(1).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(2).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(3).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(4).ToString())
                item.SubItems.Add(lugthes_source.Tables("word_name").Rows(p).ItemArray.GetValue(5).ToString())
                p += 1

            End While



        Catch ex As Exception
            MessageBox.Show(ex.Message)
            '    If (Connection.State = ConnectionState.Open) Then ' closes the connection to the database
            '

            '       Connection.close()
            '    End If
            Cursor.Current = Cursors.Default

        End Try

        If writetext.Text() = "" Then
            MessageBox.Show(" You can't continue when the box is empty. PLease insert a word you want to search.")
            Return
            meaning.Show()
        End If
       


    End Sub

i got the solution to the problem i will post it after implementation but its all about usind serverce instead of client

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.