Click here to Skip to main content
15,891,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to display data from access to DataGrid in VB.Net using coding technique only Pin
Mekong River30-Sep-04 0:00
Mekong River30-Sep-04 0:00 
AnswerRe: How to display data from access to DataGrid in VB.Net using coding technique only Pin
Britnt730-Sep-04 5:43
Britnt730-Sep-04 5:43 
GeneralRe: How to display data from access to DataGrid in VB.Net using coding technique only Pin
Mekong River30-Sep-04 15:29
Mekong River30-Sep-04 15:29 
GeneralRe: How to display data from access to DataGrid in VB.Net using coding technique only Pin
Mekong River30-Sep-04 15:53
Mekong River30-Sep-04 15:53 
Generalweb class library Pin
njppp29-Sep-04 21:14
njppp29-Sep-04 21:14 
GeneralHelp with Secant/Newton's Method Program Pin
L_JIMENEZ29-Sep-04 15:34
L_JIMENEZ29-Sep-04 15:34 
GeneralRe: Help with Secant/Newton's Method Program Pin
Christian Graus29-Sep-04 16:51
protectorChristian Graus29-Sep-04 16:51 
Questionhow to .......... Pin
Fired Dragon29-Sep-04 12:13
Fired Dragon29-Sep-04 12:13 
the purpose of this code is to display data in specific textboxes when a user click on any items in listbox ... this one i'm coding for web application.
but actually, it doesn't work at all ... i could not figure out the problems ...
could anyone there help me please?

thanks in advance

Private Sub activateform()
Dim mlstoneDreader As OleDb.OleDbDataReader
Dim mlstoneCommand As OleDb.OleDbCommand
Dim slect As String
Dim StSQl As String
Dim ConnStr As String

ConnStr = BuildSQLConnection()
slect = lstmilestone.SelectedItem.Value

StSQl = "Select staffId, LastName, FirstName, Email "
StSQl &= " From Staff "
StSQl &= " where staffId = " & slect

Try
mlstoneCommand = New OleDb.OleDbCommand()
With mlstoneCommand
.Connection = New OleDb.OleDbConnection(ConnStr)
.Connection.Open()
.CommandText = StSQl
mlstoneDreader = .ExecuteReader(CommandBehavior.SingleRow)

End With
If mlstoneDreader.Read() Then
With mlstoneDreader
txtid.Text = .Item("StaffId").ToString()
txtmlname.Text = .Item("LastName").ToString()
txtdesc.Text = .Item("FirstName").ToString()

End With
Else
ClearAll()
End If
mlstoneDreader.Close()
mlstoneCommand.Connection.Close()
Catch mlstone_e As Exception
MsgBox("Connection failed")
End Try

End Sub
Private Sub ClearAll()
txtid.Text = " "
txtmlname.Text = " "
txtdesc.Text = " "
txtnoofday.Text = " "

End Sub
AnswerRe: how to .......... Pin
Christian Graus29-Sep-04 12:24
protectorChristian Graus29-Sep-04 12:24 
GeneralRe: how to .......... Pin
Fired Dragon29-Sep-04 12:47
Fired Dragon29-Sep-04 12:47 
GeneralRe: how to .......... Pin
Christian Graus29-Sep-04 12:56
protectorChristian Graus29-Sep-04 12:56 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Fired Dragon29-Sep-04 12:57
Fired Dragon29-Sep-04 12:57 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Christian Graus29-Sep-04 13:10
protectorChristian Graus29-Sep-04 13:10 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Fired Dragon29-Sep-04 13:14
Fired Dragon29-Sep-04 13:14 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Christian Graus29-Sep-04 13:23
protectorChristian Graus29-Sep-04 13:23 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Fired Dragon29-Sep-04 13:38
Fired Dragon29-Sep-04 13:38 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Christian Graus29-Sep-04 13:42
protectorChristian Graus29-Sep-04 13:42 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Fired Dragon29-Sep-04 14:13
Fired Dragon29-Sep-04 14:13 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Christian Graus29-Sep-04 14:22
protectorChristian Graus29-Sep-04 14:22 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Fired Dragon29-Sep-04 14:33
Fired Dragon29-Sep-04 14:33 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Christian Graus29-Sep-04 14:40
protectorChristian Graus29-Sep-04 14:40 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Anonymous30-Sep-04 1:53
Anonymous30-Sep-04 1:53 
GeneralRe: how to ..........this is all what i have done, it may make you more visible Pin
Colin Angus Mackay30-Sep-04 4:23
Colin Angus Mackay30-Sep-04 4:23 
GeneralMake a service dependant from another Pin
sybux200029-Sep-04 9:34
sybux200029-Sep-04 9:34 
GeneralRe: Make a service dependant from another Pin
Dave Kreskowiak30-Sep-04 4:19
mveDave Kreskowiak30-Sep-04 4:19 

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.