Click here to Skip to main content
15,914,642 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: why it didn't find the control with its name? Pin
sanyexian8-Dec-10 15:04
sanyexian8-Dec-10 15:04 
GeneralRe: why it didn't find the control with its name? Pin
Henry Minute8-Dec-10 15:46
Henry Minute8-Dec-10 15:46 
GeneralRe: why it didn't find the control with its name? Pin
sanyexian8-Dec-10 19:36
sanyexian8-Dec-10 19:36 
Questionhello i have a question about incompatible pointer type [modified] Pin
lxlenovostar6-Dec-10 18:22
lxlenovostar6-Dec-10 18:22 
AnswerRe: hello i have a question about incompatible pointer type Pin
Luc Pattyn6-Dec-10 20:24
sitebuilderLuc Pattyn6-Dec-10 20:24 
AnswerRe: hello i have a question about incompatible pointer type Pin
_Erik_7-Dec-10 1:08
_Erik_7-Dec-10 1:08 
GeneralRe: hello i have a question about incompatible pointer type Pin
lxlenovostar7-Dec-10 4:37
lxlenovostar7-Dec-10 4:37 
QuestionFinding Field Length from DataGridView - SOLVED Pin
chrispowell123456-Dec-10 0:20
chrispowell123456-Dec-10 0:20 
Hi All,

I'm writing a simple sql editor for our solid databases, and after the information has been retrieved I need to be able to display the field lenght for the column on the Database.

I fill the datagridview like this:

 Private Sub applysql(ByVal query As String, Optional ByVal transaction As Odbc.OdbcTransaction = Nothing)<br />
        Try<br />
            Dim command As New Odbc.OdbcCommand(query, solid, transaction)<br />
            datareader = command.ExecuteReader<br />
<br />
            bindingsource.DataSource = datareader<br />
            resultsdatgdvw.DataSource = bindingsource<br />
            resultsdatgdvw.Update()<br />
            resultsdatgdvw.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.ColumnHeader)<br />
            resultslbl.Text = "Returned " & resultsdatgdvw.RowCount & " rows"<br />
            If Rollbackbtn.Enabled = False Then<br />
                transaction.Commit()<br />
            End If<br />
<br />
            datareader.close()<br />
            datareader.dispose()<br />
        Catch ex As Exception<br />
            MsgBox(ex.Message)<br />
        End Try<br />
    End Sub


and then wnat to display the tooltip with the information on like this:

Private Sub resultsdatgdvw_CellToolTipTextNeeded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellToolTipTextNeededEventArgs) Handles resultsdatgdvw.CellToolTipTextNeeded<br />
       If e.ColumnIndex > -1 Then<br />
           e.ToolTipText = "Type: " & resultsdatgdvw.Columns(e.ColumnIndex).ValueType.ToString & " Length: " & 'Here is where I need to find the max length of the field     <br />
  End If<br />
   End Sub


Any help appreciated!

Chris
AnswerRe: Finding Field Length from DataGridView Pin
Andy_L_J6-Dec-10 21:08
Andy_L_J6-Dec-10 21:08 
GeneralRe: Finding Field Length from DataGridView Pin
chrispowell123457-Dec-10 1:22
chrispowell123457-Dec-10 1:22 
QuestionProblem solved...see code Pin
pbsjr5-Dec-10 5:09
pbsjr5-Dec-10 5:09 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Dave Kreskowiak5-Dec-10 7:44
mveDave Kreskowiak5-Dec-10 7:44 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:43
pbsjr5-Dec-10 9:43 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
DaveAuld5-Dec-10 9:48
professionalDaveAuld5-Dec-10 9:48 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:51
pbsjr5-Dec-10 9:51 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 7:56
sitebuilderLuc Pattyn5-Dec-10 7:56 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:44
pbsjr5-Dec-10 9:44 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 10:08
sitebuilderLuc Pattyn5-Dec-10 10:08 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 10:59
pbsjr5-Dec-10 10:59 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 11:08
sitebuilderLuc Pattyn5-Dec-10 11:08 
Question"Cannot open any more tables" happens when I optimize my code [modified] Pin
i_kant_spel4-Dec-10 19:04
i_kant_spel4-Dec-10 19:04 
AnswerRe: "Cannot open any more tables" happens when I optimize my code [modified] Pin
Luc Pattyn4-Dec-10 23:27
sitebuilderLuc Pattyn4-Dec-10 23:27 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 7:58
i_kant_spel5-Dec-10 7:58 
AnswerRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 8:16
sitebuilderLuc Pattyn5-Dec-10 8:16 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 9:06
i_kant_spel5-Dec-10 9:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.