Click here to Skip to main content
15,917,176 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: check this Pin
Wendelius22-Jan-09 2:54
mentorWendelius22-Jan-09 2:54 
GeneralRe: check this Pin
kulandaivel_mca200722-Jan-09 3:17
kulandaivel_mca200722-Jan-09 3:17 
GeneralRe: check this Pin
Wendelius22-Jan-09 3:20
mentorWendelius22-Jan-09 3:20 
GeneralRe: check this Pin
kulandaivel_mca200722-Jan-09 3:24
kulandaivel_mca200722-Jan-09 3:24 
GeneralRe: check this Pin
kulandaivel_mca200722-Jan-09 3:31
kulandaivel_mca200722-Jan-09 3:31 
Questionrefresh command on datagridview Pin
jetgrageda21-Jan-09 21:45
jetgrageda21-Jan-09 21:45 
AnswerRe: refresh command on datagridview Pin
Wendelius22-Jan-09 1:37
mentorWendelius22-Jan-09 1:37 
GeneralRe: refresh command on datagridview Pin
jetgrageda22-Jan-09 5:36
jetgrageda22-Jan-09 5:36 
thanx for the reply..
Dim listquery1 As String
If conn.State = ConnectionState.Open Then conn.Close()

Try
conn.Open()
If cboSubj.SelectedItem.ToString = "ICSM310" And cboSec.SelectedItem.ToString = "Z14" Then

listquery1 = "Select *from sampleList;"
Dim mycmd As New MySqlCommand(listquery1, conn)
mycmd.ExecuteNonQuery()

adptr.SelectCommand = mycmd
adptr.Fill(dtable)

DataGridView1.DataSource = dtable
DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
Else
MsgBox("No list ")

End If

Catch ex As Exception
MsgBox(ex.Message)
End Try
conn.Close()
this is the first instance for loading the values in the datagrid...
for the "refresh" command
Dim listquery As String
If conn.State = ConnectionState.Open Then conn.Close()



Try
conn.Open()

Try
listquery = "Select *from sampleList;"
Dim mycmd As New MySqlCommand(listquery, conn)
mycmd.ExecuteNonQuery()

adptr.SelectCommand = mycmd
adptr.Fill(dtable)


statusView.DataSource = dtable
statusView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells

Catch myerror As MySqlException
MsgBox("There was an error reading from the database: " & myerror.Message)
End Try
Catch myerror As MySqlException
MessageBox.Show("Error connecting to the database: " & myerror.Message)
Finally
If conn.State <> ConnectionState.Closed Then conn.Close()
End Try
End Sub
note that statusView is datagridview

for the mysql adapter and datatable, i declare it at the very beginning of the code..
for me to use the command builder command...
GeneralRe: refresh command on datagridview Pin
Wendelius22-Jan-09 5:47
mentorWendelius22-Jan-09 5:47 
GeneralRe: refresh command on datagridview Pin
jetgrageda22-Jan-09 5:55
jetgrageda22-Jan-09 5:55 
GeneralRe: refresh command on datagridview Pin
Wendelius22-Jan-09 6:10
mentorWendelius22-Jan-09 6:10 
Questionconnection string Pin
kulandaivel_mca200721-Jan-09 20:32
kulandaivel_mca200721-Jan-09 20:32 
AnswerRe: connection string Pin
Abhijit Jana21-Jan-09 21:10
professionalAbhijit Jana21-Jan-09 21:10 
GeneralRe: connection string Pin
kulandaivel_mca200721-Jan-09 22:46
kulandaivel_mca200721-Jan-09 22:46 
GeneralRe: connection string Pin
Abhijit Jana21-Jan-09 23:18
professionalAbhijit Jana21-Jan-09 23:18 
AnswerRe: connection string Pin
saberbladez21-Jan-09 21:39
saberbladez21-Jan-09 21:39 
QuestionAccess Control from another form Pin
Ola E21-Jan-09 19:46
Ola E21-Jan-09 19:46 
AnswerRe: Access Control from another form Pin
Ashutosh Phoujdar22-Jan-09 0:35
Ashutosh Phoujdar22-Jan-09 0:35 
AnswerRe: Access Control from another form Pin
Ola E22-Jan-09 1:17
Ola E22-Jan-09 1:17 
GeneralRe: Access Control from another form Pin
Ben Fair22-Jan-09 6:21
Ben Fair22-Jan-09 6:21 
AnswerRe: Access Control from another form Pin
Ola E22-Jan-09 19:06
Ola E22-Jan-09 19:06 
Questionbinary file encryption Pin
Member 455503121-Jan-09 4:22
Member 455503121-Jan-09 4:22 
AnswerRe: binary file encryption Pin
Ben Fair22-Jan-09 5:59
Ben Fair22-Jan-09 5:59 
QuestionTimed GTalk Status Updater Pin
itsravie21-Jan-09 0:25
itsravie21-Jan-09 0:25 
AnswerRe: Timed GTalk Status Updater Pin
Dave Kreskowiak21-Jan-09 2:02
mveDave Kreskowiak21-Jan-09 2:02 

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.