Click here to Skip to main content
16,007,443 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: using an ftp server? Pin
Anonymous24-Oct-03 8:42
Anonymous24-Oct-03 8:42 
Generalextracting iptc data from a jpeg Pin
Luke Niland15-Oct-03 1:38
Luke Niland15-Oct-03 1:38 
GeneralRe: extracting iptc data from a jpeg Pin
Jim Taylor15-Oct-03 2:29
Jim Taylor15-Oct-03 2:29 
QuestionHow to monitor users on network? Pin
navelk15-Oct-03 0:56
navelk15-Oct-03 0:56 
GeneralTearing my hair out: drawing transparent image Pin
Jim Taylor14-Oct-03 23:23
Jim Taylor14-Oct-03 23:23 
GeneralRe: Using Paste() with multiple text boxes Pin
Mike Dimmick14-Oct-03 22:59
Mike Dimmick14-Oct-03 22:59 
GeneralRe: Using Paste() with multiple text boxes Pin
1.21 Gigawatts14-Oct-03 23:38
1.21 Gigawatts14-Oct-03 23:38 
Generalcombo box linked to datagrid Pin
iamalexCode14-Oct-03 18:38
iamalexCode14-Oct-03 18:38 
I'm trying to learn and have a problem selecting an author from the combo box and pulling up that particular authors book info in a datagrid.
Can someone please help on the Selected Index changed to pull up info in
data grid. I can't bind them together.
Would appreciate so much!!!!!!!!!!!!!!!!! Alex


Below is code:
'Call up authors name in combo box
cmdAuthors.CommandText = "Select au_id, au_fname + ' ' + au_lname as name From authors"
cmdAuthors.CommandType = CommandType.Text
cmdAuthors.Connection = conPubs



conPubs.Open()
'cboAuthors.DataTextField = paraName.Value
daAuthors.Fill(dsPubs, "Authors")

conPubs.Close()

'show the names in the combo box
cboAuthors.DataSource = dsPubs.Tables("Authors")
cboAuthors.DataTextField = "name"
cboAuthors.DataValueField = "au_id"
cboAuthors.DataBind()


End Sub

Private Sub cboAuthors_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboAuthors.SelectedIndexChanged
Dim conPubs As New SqlConnection("Server=alex; Database= pubs; UID= sa; PWD= ")

Dim cmdTitles As New SqlCommand
Dim drTitles As SqlDataReader
Dim daTitles As New SqlDataAdapter(cmdTitles)
Dim dsPubs_Titles As New DataSet

cmdTitles.CommandText = "Select title, title_ID, pub_id, pubdate From Titles Where authors.au_id = titles.title_id ORDER BY titles.title"
cmdTitles.CommandType = CommandType.Text
cmdTitles.Connection = conPubs
If Not IsPostBack Then
conPubs.Open()

End If

dgTitles.DataSource = dsPubs_Titles
drTitles = cmdTitles.ExecuteReader
dgTitles.DataSource = drTitles
dgTitles.DataBind()
daTitles.Fill(dsPubs_Titles, "Titles")

conPubs.Close()

End Sub
End Class
GeneralShutdown windows Pin
kersyanti14-Oct-03 15:02
kersyanti14-Oct-03 15:02 
GeneralParse Quotation marks Pin
Rip V. Winkle14-Oct-03 10:30
Rip V. Winkle14-Oct-03 10:30 
GeneralRe: Parse Quotation marks Pin
Dave Kreskowiak15-Oct-03 5:47
mveDave Kreskowiak15-Oct-03 5:47 
GeneralRe: Parse Quotation marks Pin
Rip V. Winkle15-Oct-03 6:34
Rip V. Winkle15-Oct-03 6:34 
GeneralRe: Parse Quotation marks Pin
Dave Kreskowiak15-Oct-03 6:50
mveDave Kreskowiak15-Oct-03 6:50 
GeneralRe: Parse Quotation marks Pin
Rip V. Winkle15-Oct-03 8:40
Rip V. Winkle15-Oct-03 8:40 
GeneralOCX Reverse Engineerin Pin
Anonymous14-Oct-03 8:30
Anonymous14-Oct-03 8:30 
GeneralRe: OCX Reverse Engineerin Pin
Steve S14-Oct-03 9:15
Steve S14-Oct-03 9:15 
GeneralRe: OCX Reverse Engineerin Pin
Anonymous14-Oct-03 12:11
Anonymous14-Oct-03 12:11 
GeneralI need HELP Pin
TheCandel_Heba13-Oct-03 15:42
TheCandel_Heba13-Oct-03 15:42 
GeneralRe: I need HELP Pin
J. Dunlap13-Oct-03 17:45
J. Dunlap13-Oct-03 17:45 
GeneralRe: I need HELP Pin
Cesar Peralta14-Oct-03 10:19
Cesar Peralta14-Oct-03 10:19 
Generalkeyboard Pin
grommit234513-Oct-03 6:36
grommit234513-Oct-03 6:36 
GeneralVisual Basic and WinXP Pin
Anonymous13-Oct-03 6:30
Anonymous13-Oct-03 6:30 
GeneralRe: Visual Basic and WinXP Pin
Rip V. Winkle16-Oct-03 11:30
Rip V. Winkle16-Oct-03 11:30 
GeneralListening to a Port Pin
Devsqi13-Oct-03 2:23
Devsqi13-Oct-03 2:23 
GeneralRe: Listening to a Port Pin
Dave Kreskowiak13-Oct-03 3:18
mveDave Kreskowiak13-Oct-03 3:18 

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.