Click here to Skip to main content
16,015,900 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: web app, opening Word Doc's Pin
Dave Kreskowiak18-Jun-07 10:20
mveDave Kreskowiak18-Jun-07 10:20 
QuestionAccess form variables from custom control (bindingsource) Pin
AlexeiXX318-Jun-07 4:56
AlexeiXX318-Jun-07 4:56 
AnswerRe: Access form variables from custom control (bindingsource) Pin
Dave Kreskowiak19-Jun-07 4:43
mveDave Kreskowiak19-Jun-07 4:43 
GeneralRe: Access form variables from custom control (bindingsource) Pin
AlexeiXX319-Jun-07 8:51
AlexeiXX319-Jun-07 8:51 
GeneralRe: Access form variables from custom control (bindingsource) Pin
Dave Kreskowiak19-Jun-07 10:41
mveDave Kreskowiak19-Jun-07 10:41 
QuestionPrint Existing files in the Folder in vb.net Pin
Saivjil18-Jun-07 2:21
Saivjil18-Jun-07 2:21 
AnswerRe: Print Existing files in the Folder in vb.net Pin
originSH18-Jun-07 4:09
originSH18-Jun-07 4:09 
QuestionDropDown problem Pin
matjame18-Jun-07 0:40
matjame18-Jun-07 0:40 
Hi guys.

I have a problem with my dropDownList.
I have a dropdownlist(name DropDownList1) in vb.net(Default.aspx.vb) preloaded with values from the database that run perfectly each time I run the page.Now the problem I get is, it seems it doesnt recognice one of the values given to print.Watch how [Branch] a string.

When I select a value from the dropdown, it must go to the database and look for that value and print vertain fields. See below

Imports System
Imports System.Data
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Dim da As OleDbDataAdapter
Dim cn As New OleDbConnection
Dim rid As OleDbDataReader
Dim cm As New OleDbCommand
Dim cb As OleDbCommandBuilder 'to create Update, Insert and Delete commands for DA
'Dim zz As OleDbConnectionStringBuilder

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
cn = New OleDbConnection("Provider = Microsoft.Jet.oledb.4.0; data source = C:\TelephoneList.mdb")
cn.Open()
cm = New OleDbCommand("Select * from [Other Branches] where [Branch] = '" & DropDownList1.SelectedValue & "'", cn)
cm.Connection = cn
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Open()
rid = cm.ExecuteReader
While rid.Read
LabelBranch.Text = rid("[Branch]")****problem here
End While
rid.Close()
cn.Close()
Application.Lock()
End Sub
End Class

Please help guys

kagiso

AnswerRe: DropDown problem Pin
Dave Kreskowiak19-Jun-07 4:17
mveDave Kreskowiak19-Jun-07 4:17 
Questiontext-2-speech Pin
Abdul8517-Jun-07 21:56
Abdul8517-Jun-07 21:56 
AnswerRe: text-2-speech Pin
Christian Graus18-Jun-07 13:21
protectorChristian Graus18-Jun-07 13:21 
AnswerRe: text-2-speech Pin
Dave Kreskowiak19-Jun-07 4:08
mveDave Kreskowiak19-Jun-07 4:08 
QuestionTab control Disable/Enable Pin
ozzyrocsdbn17-Jun-07 20:25
ozzyrocsdbn17-Jun-07 20:25 
AnswerRe: Tab control Disable/Enable Pin
Xandip17-Jun-07 20:30
Xandip17-Jun-07 20:30 
QuestionRe: Tab control Disable/Enable Pin
ozzyrocsdbn17-Jun-07 20:56
ozzyrocsdbn17-Jun-07 20:56 
AnswerRe: Tab control Disable/Enable Pin
Dave Kreskowiak18-Jun-07 1:20
mveDave Kreskowiak18-Jun-07 1:20 
QuestionSearching a Certain Column in a Datagrid VB.NET Pin
Vimalsoft(Pty) Ltd17-Jun-07 20:03
professionalVimalsoft(Pty) Ltd17-Jun-07 20:03 
AnswerRe: Searching a Certain Column in a Datagrid VB.NET Pin
Johan Hakkesteegt19-Jun-07 2:19
Johan Hakkesteegt19-Jun-07 2:19 
GeneralRe: Searching a Certain Column in a Datagrid VB.NET [modified] Pin
Vimalsoft(Pty) Ltd19-Jun-07 3:59
professionalVimalsoft(Pty) Ltd19-Jun-07 3:59 
GeneralRe: Searching a Certain Column in a Datagrid VB.NET Pin
Johan Hakkesteegt19-Jun-07 20:25
Johan Hakkesteegt19-Jun-07 20:25 
GeneralRe: Searching a Certain Column in a Datagrid VB.NET Pin
Vimalsoft(Pty) Ltd19-Jun-07 21:29
professionalVimalsoft(Pty) Ltd19-Jun-07 21:29 
QuestionVista look Pin
caltech17-Jun-07 15:38
caltech17-Jun-07 15:38 
AnswerRe: Vista look Pin
Dave Kreskowiak19-Jun-07 4:11
mveDave Kreskowiak19-Jun-07 4:11 
QuestionWhere is ConnectionString? Pin
mehrdadc4817-Jun-07 9:38
mehrdadc4817-Jun-07 9:38 
AnswerRe: Where is ConnectionString? Pin
Dave Kreskowiak18-Jun-07 1:16
mveDave Kreskowiak18-Jun-07 1:16 

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.