| | |
display information from access table in a combobox
Thread Solved |
Hi SubProf... Welcome to Daniweb friend 
i think you post thread in wrong forum..
this forum for vb not for c#...
please post in current forum -> C#

i think you post thread in wrong forum..
this forum for vb not for c#...
please post in current forum -> C#
Last edited by Jx_Man; Mar 7th, 2008 at 1:02 pm.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
•
•
Hello,
I have a combobox on my form that I need to be populated with data from a table in MS Access. I am new to coding in Visual c# and would appreciate any help I can get with this.
Thanks in advance,
SubProf
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
using system.data oledb.oldedbconnection con; string sql; dataset ds=new dataset(); oledb.oledbDataAdaptar da; int maxrows=0,i=0; con=new oledb.oldedbconnection(); con.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\STUDENT.MDB;Persist Security Info=False"; con.open(); sql="select name from information order by rollno"; da=new oledb.oledbDataAdaptar(sql,con); da.fill(ds,"Information"); maxrows=ds.tables("Information").Rows.Count(); dropdownlist1.items.clear for(;i<=maxrows-1;i++) { dropdownlist1.items.add ds.tables("Information").Rows(i).Item("Name"); }
regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Setting up a Project
- Next Thread: Checkedlistbox
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






