2

I am a student How to connect to access database using code ( not using wizard) and retrive values in the textbox in c# using visual studio 2008.

I have to extract 3 fields from the access database.

Do anybody know. Pl help.

0

3 Answers 3

4

OleDbConnection is the standard class to query an Access database. Here's an example.

Sign up to request clarification or add additional context in comments.

Comments

0

Start by reading up on ADO.NET and then use the OleDb Data Provider. Once you have the values it should be trivial to put them into a text box.

Here is a good ADO.NET tutorial:

And some good OLEDB info:

Comments

0

In addition: Get the "Visual C# 2010 Samples" from

http://code.msdn.microsoft.com/cs2010samples/Wiki/View.aspx?title=Home

and look at the

"OLEDB: Demonstrates how to use a Microsoft Access database from C# by creating a dataset and adding tables to it."

sample.

1 Comment

Sorry about missing that. In an attempt to compensate: I tried (and succeded) in compiling & running the solution using Visual C# 2008 (Express) - after copying the .mdb to bin\debug

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.