Click here to Skip to main content
16,006,013 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: In need of help on VB Pin
Zyprost8-Feb-11 18:27
Zyprost8-Feb-11 18:27 
RantRe: In need of help on VB Pin
Dwayne J. Baldwin8-Feb-11 13:29
Dwayne J. Baldwin8-Feb-11 13:29 
GeneralRe: In need of help on VB Pin
Dave Kreskowiak8-Feb-11 13:36
mveDave Kreskowiak8-Feb-11 13:36 
GeneralRe: In need of help on VB Pin
Dwayne J. Baldwin8-Feb-11 13:53
Dwayne J. Baldwin8-Feb-11 13:53 
GeneralRe: In need of help on VB Pin
Dave Kreskowiak8-Feb-11 15:40
mveDave Kreskowiak8-Feb-11 15:40 
AnswerRe: In need of help on VB Pin
popkutty10-Feb-11 17:16
popkutty10-Feb-11 17:16 
AnswerRe: In need of help on VB Pin
hugoguan25-May-11 23:06
hugoguan25-May-11 23:06 
QuestionAdd two field from database to combobox Pin
ivo755-Feb-11 3:53
ivo755-Feb-11 3:53 
Hi I use this code and want to add id and avtor to combobox but display the field "avtor", when I select some from combobox I want to get "id"
Private Sub avtori()
       Dim selectdata As String
       selectdata = "SELECT id, avtor FROM avtor"
       Dim strConn As String
       Dim reader As OleDbDataReader
       'Низ за връзка с БД
       strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strAcessFilePath1 & ";Jet OLEDB:Database Password=;"
       OleDbConnection2 = New OleDbConnection(strConn)
       OleDbConnection2.Open() 'Отваряне на връзка с БД
       OleDbCommand2 = New OleDbCommand(selectdata, OleDbConnection2)
       reader = OleDbCommand2.ExecuteReader()
       'Цикъл за извличане на всички автори и тяхното добавя към комбинирина списъчна кутия
       Dim i As Integer
       While reader.Read()
           ComboBox1.Items.Add(reader("avtor"))

       End While
       reader.Close()
       OleDbCommand2.Dispose()
       OleDbConnection2.Close()
   End Sub

modified on Saturday, February 5, 2011 2:15 PM

AnswerRe: Add two field from database to combobox Pin
Dave Kreskowiak5-Feb-11 8:20
mveDave Kreskowiak5-Feb-11 8:20 
QuestionSub routine not working Pin
Doug Ancil4-Feb-11 5:32
Doug Ancil4-Feb-11 5:32 
AnswerRe: Sub routine not working Pin
riced4-Feb-11 6:08
riced4-Feb-11 6:08 
GeneralRe: Sub routine not working Pin
Doug Ancil4-Feb-11 7:51
Doug Ancil4-Feb-11 7:51 
GeneralRe: Sub routine not working Pin
ChandraRam4-Feb-11 9:53
ChandraRam4-Feb-11 9:53 
GeneralRe: Sub routine not working Pin
Doug Ancil4-Feb-11 10:57
Doug Ancil4-Feb-11 10:57 
GeneralRe: Sub routine not working Pin
riced4-Feb-11 11:40
riced4-Feb-11 11:40 
GeneralRe: Sub routine not working Pin
riced4-Feb-11 11:48
riced4-Feb-11 11:48 
GeneralRe: Sub routine not working Pin
Doug Ancil7-Feb-11 4:22
Doug Ancil7-Feb-11 4:22 
AnswerRe: Sub routine not working Pin
Luc Pattyn7-Feb-11 4:34
sitebuilderLuc Pattyn7-Feb-11 4:34 
GeneralRe: Sub routine not working Pin
Doug Ancil7-Feb-11 4:45
Doug Ancil7-Feb-11 4:45 
GeneralRe: Sub routine not working Pin
Luc Pattyn7-Feb-11 5:07
sitebuilderLuc Pattyn7-Feb-11 5:07 
GeneralRe: Sub routine not working Pin
Doug Ancil7-Feb-11 5:22
Doug Ancil7-Feb-11 5:22 
GeneralRe: Sub routine not working Pin
riced7-Feb-11 9:43
riced7-Feb-11 9:43 
Questionocx control tabctl32 on a windows 7 Pin
omlac3-Feb-11 20:50
omlac3-Feb-11 20:50 
AnswerRe: ocx control tabctl32 on a windows 7 Pin
Dave Kreskowiak4-Feb-11 8:09
mveDave Kreskowiak4-Feb-11 8:09 
QuestionDon't allow notifyIcon to be hidden Pin
LCARS x323-Feb-11 6:55
LCARS x323-Feb-11 6:55 

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.