Click here to Skip to main content
16,005,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What is the right SQL Query... Pin
Dave Kreskowiak20-Jan-09 18:50
mveDave Kreskowiak20-Jan-09 18:50 
QuestionRedirect to older version of assembly? Pin
Member 278944420-Jan-09 6:26
Member 278944420-Jan-09 6:26 
AnswerRe: Redirect to older version of assembly? Pin
nlarson1120-Jan-09 7:49
nlarson1120-Jan-09 7:49 
QuestionUsing Word 2000 files from VS 2005 Pin
Richard Jones20-Jan-09 4:26
Richard Jones20-Jan-09 4:26 
AnswerRe: Using Word 2000 files from VS 2005 Pin
EliottA20-Jan-09 5:56
EliottA20-Jan-09 5:56 
GeneralRe: Using Word 2000 files from VS 2005 Pin
Richard Jones20-Jan-09 5:58
Richard Jones20-Jan-09 5:58 
GeneralRe: Using Word 2000 files from VS 2005 Pin
EliottA20-Jan-09 6:00
EliottA20-Jan-09 6:00 
QuestionProblem on insert data into Datagridview Pin
drexler_kk20-Jan-09 2:33
drexler_kk20-Jan-09 2:33 
Dear all,
I'm new to VB.NET,I have this error:

System.Data: Value cannot be null.
Parameter name: dataSet

I want to display the data search result into the datagridview for the user. But I found the above error. The following is my code,the user click button1(which is the search button),then it will search from the database. The message box I'm here have pop out like usual. Anyone can tell me whats wrong with it?

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


        Try
            If Trim(TextBox2.Text) <> "" Then
                x = TextBox2.Text.ToUpper

                SQL = "SELECT * FROM company_detail WHERE Comp_Name LIKE '" & x & "%'"
                ObjComm = New MySqlCommand(SQL, ObjMyConn)
                ObjMyConn.Open()
                ObjRead = ObjComm.ExecuteReader
                If ObjRead.Read Then
                    MessageBox.Show("I'm here")
                    ObjAdapter = New MySqlDataAdapter(SQL, ObjMyConn)
                    ObjAdapter.Fill(ds, "Client_Comp")
                    dt = ds.Tables("Client_Comp")
                    DataGridView1.DataSource = dt

                End If

            End If
            ObjMyConn.Close()
        Catch ex As Exception
            MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly)
        End Try

    End Sub


Thank you for reading.
AnswerRe: Problem on insert data into Datagridview Pin
Eddy Vluggen20-Jan-09 3:33
professionalEddy Vluggen20-Jan-09 3:33 
AnswerRe: Problem on insert data into Datagridview Pin
Dave Kreskowiak20-Jan-09 6:12
mveDave Kreskowiak20-Jan-09 6:12 
QuestionConsole application independent from .NET Framework [modified] Pin
stardust161119-Jan-09 23:31
stardust161119-Jan-09 23:31 
AnswerRe: Console application independent from .NET Framework Pin
Steven J Jowett19-Jan-09 23:36
Steven J Jowett19-Jan-09 23:36 
GeneralRe: Console application independent from .NET Framework Pin
stardust161119-Jan-09 23:42
stardust161119-Jan-09 23:42 
GeneralRe: Console application independent from .NET Framework Pin
Mycroft Holmes19-Jan-09 23:51
professionalMycroft Holmes19-Jan-09 23:51 
AnswerRe: Console application independent from .NET Framework Pin
Christian Graus20-Jan-09 2:14
protectorChristian Graus20-Jan-09 2:14 
GeneralRe: Console application independent from .NET Framework Pin
Eddy Vluggen20-Jan-09 3:26
professionalEddy Vluggen20-Jan-09 3:26 
QuestionGet Selected text of WebBrowser control Pin
Gagan.2019-Jan-09 17:37
Gagan.2019-Jan-09 17:37 
AnswerRe: Get Selected text of WebBrowser control Pin
Dave Kreskowiak20-Jan-09 2:14
mveDave Kreskowiak20-Jan-09 2:14 
QuestionSerial Communication [modified] Pin
Subjugate19-Jan-09 14:10
Subjugate19-Jan-09 14:10 
AnswerRe: Serial Communication Pin
Dave Kreskowiak20-Jan-09 2:13
mveDave Kreskowiak20-Jan-09 2:13 
GeneralRe: Serial Communication Pin
Rajesh Anuhya20-Jan-09 17:17
professionalRajesh Anuhya20-Jan-09 17:17 
GeneralRe: Serial Communication Pin
Dave Kreskowiak20-Jan-09 18:49
mveDave Kreskowiak20-Jan-09 18:49 
GeneralRe: Serial Communication Pin
Subjugate20-Jan-09 21:01
Subjugate20-Jan-09 21:01 
GeneralRe: Serial Communication Pin
Dave Kreskowiak21-Jan-09 2:07
mveDave Kreskowiak21-Jan-09 2:07 
GeneralRe: Serial Communication Pin
Subjugate22-Jan-09 16:41
Subjugate22-Jan-09 16:41 

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.