G
Guest
I have a small app that is basically a catalog. When the user selects an item from a list box, it updates a description textbox with a description from an access db. Any description over 255 characters is truncated to 255. I have verified the access field is of type memo and the entire string is there. I have also tried setting the maxlength property to 700. It still truncates the text. Any Ideas? Here's the code that does the update
Private Sub Trans_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Trans.SelectedValueChange
Dim i As Double =
Dim descstring As Strin
If Trans.Text <> "No Transmissions Found" The
Desc.Clear(
Me.List1.Items.Clear(
DA = New OleDb.OleDbDataAdapter("select distinct cat_desc from [desc] where stocknum = '" & Trans.Text & "'", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
Desc.Text = "Description not available
Button3.Visible = Fals
Els
descstring = Trans.Text & " - " & (Rst.Rows(i)("cat_desc")
Desc.Text = descstrin
Rst.Clear(
DA = New OleDb.OleDbDataAdapter("select stocknum from [image] where stocknum = '" & Trans.Text & "'", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
Button3.Visible = Fals
Els
Button3.Visible = Tru
End I
End I
Rst.Clear(
End I
i =
Me.List1.Items.Clear(
If IsDBNull(Me.Engine.Text) = False The
DA = New OleDb.OleDbDataAdapter("SELECT Tag " &
" FROM query1 WHERE Stocknum = '" & Trans.Text & "' ", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
List1.Items.Add("No code numbers found."
Els
Do While i < Rst.Rows.Coun
List1.Items.Add(Rst.Rows(i)("tag")
i +=
Loo
Rst.Clear(
End I
End I
Me.list1label.Text = "Transmission Code Numbers
End Sub
Private Sub Trans_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Trans.SelectedValueChange
Dim i As Double =
Dim descstring As Strin
If Trans.Text <> "No Transmissions Found" The
Desc.Clear(
Me.List1.Items.Clear(
DA = New OleDb.OleDbDataAdapter("select distinct cat_desc from [desc] where stocknum = '" & Trans.Text & "'", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
Desc.Text = "Description not available
Button3.Visible = Fals
Els
descstring = Trans.Text & " - " & (Rst.Rows(i)("cat_desc")
Desc.Text = descstrin
Rst.Clear(
DA = New OleDb.OleDbDataAdapter("select stocknum from [image] where stocknum = '" & Trans.Text & "'", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
Button3.Visible = Fals
Els
Button3.Visible = Tru
End I
End I
Rst.Clear(
End I
i =
Me.List1.Items.Clear(
If IsDBNull(Me.Engine.Text) = False The
DA = New OleDb.OleDbDataAdapter("SELECT Tag " &
" FROM query1 WHERE Stocknum = '" & Trans.Text & "' ", Dataconn
DA.Fill(Rst
If Rst.Rows.Count = 0 The
List1.Items.Add("No code numbers found."
Els
Do While i < Rst.Rows.Coun
List1.Items.Add(Rst.Rows(i)("tag")
i +=
Loo
Rst.Clear(
End I
End I
Me.list1label.Text = "Transmission Code Numbers
End Sub