axt3k Posted November 8, 2007 at 03:48 PM Report Share #146118 Posted November 8, 2007 at 03:48 PM boas pessoall 😛 gostava de saber como posso ler uma string da BD mas com um limite de 50 caracteres por exemplo... ou seja ler os primeiros 50 caracteres da string e ignorar os restantes... estou a conectarme desta forma para recolher os dados da string completa: MyDataGridView.Rows.Add(Liga1.Tables("OpenSQL").Rows(i).Item("tabela"), Liga1.Tables("OpenSQL").Rows(i).Item("campo") etc... 😞 www.lsantos.info Link to comment Share on other sites More sharing options...
Weasel Posted November 8, 2007 at 03:59 PM Report Share #146121 Posted November 8, 2007 at 03:59 PM Talvez Strings.Left(texto_obtido_da_db, 50) Knowledge to the masses Link to comment Share on other sites More sharing options...
axt3k Posted November 8, 2007 at 04:11 PM Author Report Share #146124 Posted November 8, 2007 at 04:11 PM n me parece.... 😞 www.lsantos.info Link to comment Share on other sites More sharing options...
axt3k Posted November 8, 2007 at 04:14 PM Author Report Share #146126 Posted November 8, 2007 at 04:14 PM se alguem souber limitar tb n entrada da DG tb serve crio as colunas e as dmiensões assim: MyDataGridView.Columns(11).Name = "Obs." MyDataGridView.Columns(11).Width = 140 alguem sabe como limitar os caracteres aki ? www.lsantos.info Link to comment Share on other sites More sharing options...
Weasel Posted November 8, 2007 at 07:17 PM Report Share #146185 Posted November 8, 2007 at 07:17 PM Não te parece? testas-te ? Aquilo faz com que apenas apareçam os 50 caracteres da esquerda da string..... Public Class Form1   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load     Dim texto_obtido_da_db As String = "Descubra as diferenças entre o Google e outros motores de busca, ao verificar como transformamos indicações de pesquisa simples em opções de busca avançadas."     TextBox1.Text = Strings.Left(texto_obtido_da_db, 50)   End Sub End Class Knowledge to the masses Link to comment Share on other sites More sharing options...
axt3k Posted November 9, 2007 at 09:20 AM Author Report Share #146273 Posted November 9, 2007 at 09:20 AM tens razao... 😞 falei sem testar grave erro heheh ja rula 😛 tks www.lsantos.info Link to comment Share on other sites More sharing options...
axt3k Posted November 9, 2007 at 11:41 AM Author Report Share #146295 Posted November 9, 2007 at 11:41 AM mas acabei por fazer de outra maneira.. a quem interessar aqui fica Val(Mid(cmbdados.Text, 1, 3)) www.lsantos.info Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now