i like the advice but still it seeems not to be working i made changed the local propeties to true but still the application is not fetching data from the database

am using .sdf database. the problem is exactly that the application does not copy database to the client machine so i guess that is the reason why it does not display

Actually what i was trying to say is that. i finished publishing my software. but it seems when i install and run the application on other computers, it does not bring out the output: so i don't know where the problem ios. copuld it be that when the application is installing it does not copy the database file to the destiny where it can be read from?

i published my projects but it seems when i install the published setup, the application does not fetch data from the database yet the database is included in the published application. could anyone help me with this exception?

option 2 is you can go to your project property and choose the last tab where it says publish and then you can choose either to run a wizard or to folllow steps

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

[CODE]
dim rows as listviewitem
rows = 0
If (Row > 0) Then
'condition
Else
messagebox.show("there is no record") [/CODE]
this can also work for you

any way some thing here can also work you need to call the getvalue identifier in your code as you
additem.listview(declaration)getvalue(index)

possibly you can change the primary key because i understand if your using the sql light, it does not allow to duplicate the primary key
add another field of index which is auto incremented and will not be used in the display

thx

i dint know i can do it in code. i thought it was just a matter of changing some of the property settings. but if its with code for sure i know nothing i just seek help from u guys

I want to extend my list-view displayed information to the next line in a column but i have tried the property it has refused what is the alternative?

I just added as a reference

I have connected my vb .net forms to the MYSQL database but when i comes to publishing, i do not get the database on the published application. what shd i do?

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

[CODE]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[/CODE]

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

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

[CODE]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[/CODE]

i have really tried to handel my errors but when i search i get an exception of
key has exceeded the length of 198
i dont know if the problem is with my databse

i want my program to have a splash screen as the starting screen
but i need it to automatically count 10 minutes after it closes and form 1 loads. is it possible
should i use a timer or what?

ok thx

what i wanted was searching from two fields could this work?
sqlselect = "SELECT * FROM word_name WHERE ekigambo = '" & writetext.Text OR word='" & writetext.text
but now i need the update table from the results of the select statement
this is what i did
i declared a variable in the search form as public
dim refer as writetext.textbox
and i need to call it to the other form to display the searched results i did this because the update another table failed

[code]Dim Connection As New SqlClient.SqlConnection("Data Source=Data Source=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\LugWdLib\LugWdLib\lugthes_source.sdf")

  Dim Command As New SqlClient.SqlCommand

  Dim sqlselect As String

  If (Connection.State = ConnectionState.Closed) Then

  Connection.Open()

  End If

  'connecting to database to seek for data

  Command.Connection = Connection

  sqlselect = "(SELECT* FROM word_name WHERE word="")" & writetext.Text

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

  Dim word_name As DataSet = New DataSet()

  check.Fill(word_name, "word_name")

  Dim numRow = word_name.Tables("word_name").Rows.Count()

  Try

  Connection.Open()

  Command.ExecuteNonQuery()

  Connection.Close()

  Catch ex As Exception

  Finally

  Command.Dispose()

  Connection.Dispose()

  End Try[/code]

to
[code=sql]select* from word_name where ekigambo ="" & textbox[/code]

but what am not really sure is whether this code can do what i want because i corrected and it gives me the exption

how do i need to correct it help me please

2 Days Ago
different datatable update
i have a big problem yet ihave to present this project on monday
my database which i have to present next week. i have tried to play with the codes but still it has failed to retrive and update data.
i need a code that searches a word through the datatable(field ekigambo) and update the search into another table (temporary_store)it has fields
1 word1
2 lug
3 word2
4 eng
and the other table i want to store to has the same fields
the reason am doing this is because my forms can not use the first table to display information on the other table after searching it that is why i created another table that temporarilly stores the searched information so that i display it in the other form. i am working with Vb 2008
i will be greatful if you help me
[CODE]Dim Connection As New SqlClient.SqlConnection("Data Source=Data Source=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\LugWdLib\LugWdLib\lugthes_source.sdf")
Dim Command As New SqlClient.SqlCommand
Dim sqlselect As String
If (Connection.State = ConnectionState.Closed) Then
Connection.Open()
End If
'connecting to database to seek for data
Command.Connection = Connection
sqlselect = "(SELECT* FROM word_name WHERE word OR ekigambo="")" & writetext.Text
Dim check As System.Data.SqlClient.SqlDataAdapter = New System.Data.SqlClient.SqlDataAdapter(sqlselect, Connection)
Dim word_name As DataSet = New DataSet()
check.Fill(word_name, "word_name")
Dim numRow = word_name.Tables("word_name").Rows.Count()

    Try
        Connection.Open()
        Command.ExecuteNonQuery()
        Connection.Close()
    Catch ex As Exception
    Finally
        Command.Dispose()
        Connection.Dispose()
    End Try

    'updating table for retrival of data
    Dim cmd As New System.Data.SqlClient.SqlCommand
    Dim connection1 As New SqlClient.SqlConnection ...

ok the code i have generated sofar is hee

Dim cconnection As String = "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\LugWdLib\LugWdLib\Database1.sdf"

    Dim ebigambo As String = ekigambo.ToString() & "-" & lug_meaning.ToString() & "-" & word.ToString() & "-" & eng_meaning.ToString()
    Dim sqlStr As String = "insert into word_name(ekigambo,lug_meaning,eng_meaning,word)values('" & ekigambo.Text.ToString & " ','" & lug_meaning.Text.ToString() & "','" & eng_meaning.Text.ToString() & "','" & word.Text.ToString() & "')"

I dont know how to link my table to the database yet i already finished connecting to the application itself.
i have four fields on the form as well in the database table. that is
1.word
2.lug_trans
3.Eng_trans
4.meaning
the same fields appear in the database tables.
i have to fill and hen after extract the data and display it on another form in four labels
i wish someone could help me

thank you the code worked am looking forward to produce the best

thank you then let me try it out
Am sorry am new to the language so i keep testing my self

I have two radio btuttons which link me to another form but they have failed to likk me to the forms i directhem to link me to.
i dont know if ther is any problem with my code this is the code. some one to help me

[CODE]
Dim one As boolean
Dim two As boolean

If one = True Then frmone.Show
Else
If two = True Then frmsec.Show
Else
me.hide

End if

[/CODE]