Click here to Skip to main content
15,301,841 members
Home / Discussions / C#
   

C#

 
GeneralRe: How C# should communicate with access db file ? Pin
Not Active10-Mar-10 17:30
mentorNot Active10-Mar-10 17:30 
GeneralRe: How C# should communicate with access db file ? Pin
coding freaks10-Mar-10 19:58
Membercoding freaks10-Mar-10 19:58 
GeneralRe: How C# should communicate with access db file ? Pin
Dave Kreskowiak10-Mar-10 17:56
mveDave Kreskowiak10-Mar-10 17:56 
GeneralRe: How C# should communicate with access db file ? Pin
coding freaks10-Mar-10 20:01
Membercoding freaks10-Mar-10 20:01 
GeneralRe: How C# should communicate with access db file ? Pin
Dave Kreskowiak10-Mar-10 17:42
mveDave Kreskowiak10-Mar-10 17:42 
GeneralRe: How C# should communicate with access db file ? Pin
coding freaks10-Mar-10 20:02
Membercoding freaks10-Mar-10 20:02 
GeneralRe: How C# should communicate with access db file ? Pin
Luc Pattyn10-Mar-10 17:34
sitebuilderLuc Pattyn10-Mar-10 17:34 
AnswerRe: How C# should communicate with access db file ? Pin
coding freaks10-Mar-10 20:17
Membercoding freaks10-Mar-10 20:17 
required

using System.Data.OleDb;

Declaration part Smile | :)
string id;
string sqlQRY;
OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "/Data.mdb");
OleDbCommand cmd = new OleDbCommand();
OleDbDataReader dr;


Open the connection in this statement

cn.Open();

its like database items loading in a list

cmd.CommandText = "SELECT * FROM tbladmin ORDER BY ID ASC";
cmd.Connection = cn;
dr = cmd.ExecuteReader();
while (dr.Read())
{
ListViewItem list = new ListViewItem(dr[0].ToString());
list.SubItems.Add(dr[1].ToString());
list.SubItems.Add(dr[2].ToString());
listView1.Items.AddRange(new ListViewItem[] { list });
}
dr.Close();


this is wat i can help for now.. it tedious cant post the whole code here.. sending ur mail id wil help....
others pls gimme a break .. stop pulling my leg...
QuestionText Files Pin
Darrall10-Mar-10 12:55
MemberDarrall10-Mar-10 12:55 
AnswerRe: Text Files Pin
DaveyM6910-Mar-10 14:16
professionalDaveyM6910-Mar-10 14:16 
GeneralRe: Text Files Pin
Darrall10-Mar-10 14:36
MemberDarrall10-Mar-10 14:36 
QuestionLooping through Dataset instead of DataGridView? Pin
Eagle3210-Mar-10 11:48
MemberEagle3210-Mar-10 11:48 
AnswerRe: Looping through Dataset instead of DataGridView? Pin
Dan Mos10-Mar-10 12:03
MemberDan Mos10-Mar-10 12:03 
GeneralRe: Looping through Dataset instead of DataGridView? Pin
Eagle3210-Mar-10 12:11
MemberEagle3210-Mar-10 12:11 
GeneralRe: Looping through Dataset instead of DataGridView?[modified] Pin
Dan Mos10-Mar-10 12:24
MemberDan Mos10-Mar-10 12:24 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Som Shekhar10-Mar-10 18:13
MemberSom Shekhar10-Mar-10 18:13 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Eagle3211-Mar-10 12:02
MemberEagle3211-Mar-10 12:02 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Som Shekhar11-Mar-10 18:06
MemberSom Shekhar11-Mar-10 18:06 
QuestionClass properties - how to change values from form Pin
peropata10-Mar-10 10:32
Memberperopata10-Mar-10 10:32 
AnswerRe: Class properties - how to change values from form Pin
Dan Mos10-Mar-10 10:44
MemberDan Mos10-Mar-10 10:44 
GeneralRe: Class properties - how to change values from form Pin
peropata10-Mar-10 11:46
Memberperopata10-Mar-10 11:46 
GeneralRe: Class properties - how to change values from form Pin
Dan Mos10-Mar-10 12:10
MemberDan Mos10-Mar-10 12:10 
GeneralRe: Class properties - how to change values from form Pin
peropata10-Mar-10 19:54
Memberperopata10-Mar-10 19:54 
QuestionC# dataset/adapter connection Pin
2010JohnFByers10-Mar-10 9:50
Member2010JohnFByers10-Mar-10 9:50 
AnswerRe: C# dataset/adapter connection Pin
Dan Mos10-Mar-10 10:09
MemberDan Mos10-Mar-10 10:09 

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.