jin katama

hello guys i don't know how to connect to ms acces using vb.net

so pls tell me about it

it want to learn

  • how to add a record in the table
  • update a record in the table
  • how to create a ms access database during runtime(without creating the file in the ms access)
  • how to delete a record in the table
  • how to sort the records in the table




Re: Visual Basic Express Edition thanks

Suprotim Agarwal

Dear Jin,

Check this link.

Some video tutorials are also available over here.

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
-----






Re: Visual Basic Express Edition thanks

Jon1s

Jin,

Answering all that would be a bit of a long post!

To add a data source i.e. ms database ur can choose add new data source from the data menu item, this will guide you through attaching a database to your project and building a connection string

Add/ deleting/ inserting/ updating can be done a number of ways but to start with get to grips with datasets, tablea adapters, and all this can be done using the binding navigator and direct entry to you tables. then you can move on to running your own sql statments at runtime once you get more familiar with the enviroment and code. search this forum there are many great example on adding SQL direct into your code at run time.

But a great way of learn better than any of us in this forum could do (without a lot of writing) just follow this video series.

Forms over Data Video Series

http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx



it will only take you a couple of hours but save you days/ weeks if you had to read about it and experiment.

watch that then post things your unsure about

good luck!







Re: Visual Basic Express Edition thanks


Re: Visual Basic Express Edition thanks

Martin Xie - MSFT

Hi Jin,

Please check Data Samples.

These samples demonstrate various data access scenarios in VB.NET.

If you are interested in VB.NET, here are more resources for you to start with.

1. Visual Basic Sample Applications

http://msdn2.microsoft.com/en-us/library/5ekc8at3(VS.80).aspx

2. 101 Visual Basic and C# Code Samples

Visual Basic .NET Code Samples: Master Set of 101 Samples

3. Learning Resources for Visual Basic Express (Video Series)

http://msdn2.microsoft.com/en-us/vstudio/Aa700732.aspx

4. Free Book - Introducing Microsoft Visual Basic 2005 for Developers

http://msdn2.microsoft.com/en-us/vbrun/ms788235.aspx

5. Visual Basic .NET Programming for Beginners

http://www.homeandlearn.co.uk/NET/vbNet.html

I hope that can help you.

Best regards,

Martin Xie






Re: Visual Basic Express Edition thanks

jin katama

thank u




Re: Visual Basic Express Edition thanks

jin katama

thanks






Re: Visual Basic Express Edition thanks

jin katama

thank u






Re: Visual Basic Express Edition thanks

jin katama

thanks






Re: Visual Basic Express Edition thanks

Martin Xie - MSFT

You're welcome!

If you have any difficulties in future developing, please feel free to come back.

Good luck!






Re: Visual Basic Express Edition thanks

jin katama

sorry to disturb u

i have downloaded a project it is working perfectly

i don't know what the project does

http://rapidshare.com/files/53294621/Database1.mdb

explain the project with this access file

http://rapidshare.com/files/53294622/AccessDB.rar

pls help me






Re: Visual Basic Express Edition thanks

Martin Xie - MSFT

jin katama wrote:

i have downloaded a project it is working perfectly

i don't know what the project does

http://rapidshare.com/files/53294621/Database1.mdb

explain the project with this access file

http://rapidshare.com/files/53294622/AccessDB.rar

pls help me

Hi Jin,

I have downloaded the project "AccessDB.rar".

This is a simple applicatin about data access in VB.NET, which just demonstrates basic operations: Preview/Insert/Updat/Delete a record in Access database. It connects to Access database by Microsoft.Jet.OLEDB. Please view the code.

The db.mdb file only contains a table "talMain" with only 4 fieds as below.

Code Snippet

Field Name Data Type

UserId AutoNumber

FirstName Text

LastName Text

Age Number

by the way, DAO is not supported to be used with .Net:

INFO: Microsoft .NET Framework Does Not Support Data Access Object

http://support.microsoft.com/kb/311058

Regards,

Martin Xie






Re: Visual Basic Express Edition thanks

jin katama

thanks