Visual Basic Development Bookmark and Share   
 Home > Visual Basic General > Learning VB
 

Learning VB

Can someone suggest some tutorials or books to help me learn using VB .NET (in Visual Studio 2008) for someone who knows C# and Java?

I need to make a database application using VB and SQL Server; I mean, I NEED TO START AND FINISH DEVELOPING IT ALREADY. I really don't have much time. I am aware that doing it in VB won't be much of a pain given the fact that I know C# and Java.

Thanks!
theMethod  Wednesday, November 25, 2009 8:21 PM

Thank you All for your friendly help.

Hi theMethod,

Welcometo MSDN forums!

Here are four methods tomake one basicData Access application(Previous, Next, First. Last, Update,Delete,Insert, Select, Save) for you to check and follow.

Method 1:Update (Insert/Update/Delete) data back into SQL Server database via a DataGridView.
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/5980181e-f666-4f0a-ab50-c4ebecf96f02/

ImportsSystem.Data.SqlClient

PublicClassForm1

DimmyDAAsSqlDataAdapter

DimmyDataSetAsDataSet

PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

DimconAsSqlConnection=NewSqlConnection("DataSource=.;IntegratedSecurity=True;AttachDbFilename=|DataDirectory|\SqlDatabase.mdf")

DimcmdAsSqlCommand=NewSqlCommand("SELECT*FROMTable1",con)

con.Open()

myDA=NewSqlDataAdapter(cmd)

'AutomaticallygeneratesDeleteCommand,UpdateCommandandInsertCommandforDataAdapterobject

DimbuilderAsSqlCommandBuilder=NewSqlCommandBuilder(myDA)

myDataSet=NewDataSet()

myDA.Fill(myDataSet,"MyTable")

DataGridView1.DataSource=myDataSet.Tables("MyTable").DefaultView

con.Close()

con=Nothing

EndSub

'SavedatafromDataGridViewintoDatabase

PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click

Me.Validate()

Me.myDA.Update(Me.myDataSet.Tables("MyTable"))

Me.myDataSet.AcceptChanges()

EndSub

EndClass



Method 2.Using Data Wizard with a BindingNavigator control.
Please check the 11th post in this threadfor detailed walkthrough:
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/ff3f953b-da66-4f03-b4e4-981bab7d783b/


Method 3. UsingDataSet/DataTable/DataAdapter inVB.NET code
Please check the 12th post and 13th post in this threadfor detailed code sample.
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/ff3f953b-da66-4f03-b4e4-981bab7d783b/


Method 4.ExecuteSelect/Insert/Delete/Update T-SQL commandsin VB.NET code
Code sample: How toSelect/Insert/Delete/Updaterecords in MS Access databasein VB.NET
http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/87913f28-992d-4705-963b-cb0ffa53d8dd/
Code sample: How toSelect/Insert/Delete/Updaterecords in SQL Serverdatabasein VB.NET
http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/89e1067d-16e7-44e8-b12d-d78845bf255f/



Best regards,
Martin Xie


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Martin Xie - MSFT  21 hours 4 minutes ago
while you wait for other replies, try the following link.

http://www.itwriting.com/pcw/vbdotnetdata.php
http://www.developerfusion.com/article/4286/an-introduction-to-vbnet-and-database-programming/

Hi Trujade !
check your Link

www.shariqdon.media.officelive.com
ShariqDON  Wednesday, November 25, 2009 9:03 PM

Thank you All for your friendly help.

Hi theMethod,

Welcometo MSDN forums!

Here are four methods tomake one basicData Access application(Previous, Next, First. Last, Update,Delete,Insert, Select, Save) for you to check and follow.

Method 1:Update (Insert/Update/Delete) data back into SQL Server database via a DataGridView.
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/5980181e-f666-4f0a-ab50-c4ebecf96f02/

ImportsSystem.Data.SqlClient

PublicClassForm1

DimmyDAAsSqlDataAdapter

DimmyDataSetAsDataSet

PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

DimconAsSqlConnection=NewSqlConnection("DataSource=.;IntegratedSecurity=True;AttachDbFilename=|DataDirectory|\SqlDatabase.mdf")

DimcmdAsSqlCommand=NewSqlCommand("SELECT*FROMTable1",con)

con.Open()

myDA=NewSqlDataAdapter(cmd)

'AutomaticallygeneratesDeleteCommand,UpdateCommandandInsertCommandforDataAdapterobject

DimbuilderAsSqlCommandBuilder=NewSqlCommandBuilder(myDA)

myDataSet=NewDataSet()

myDA.Fill(myDataSet,"MyTable")

DataGridView1.DataSource=myDataSet.Tables("MyTable").DefaultView

con.Close()

con=Nothing

EndSub

'SavedatafromDataGridViewintoDatabase

PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click

Me.Validate()

Me.myDA.Update(Me.myDataSet.Tables("MyTable"))

Me.myDataSet.AcceptChanges()

EndSub

EndClass



Method 2.Using Data Wizard with a BindingNavigator control.
Please check the 11th post in this threadfor detailed walkthrough:
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/ff3f953b-da66-4f03-b4e4-981bab7d783b/


Method 3. UsingDataSet/DataTable/DataAdapter inVB.NET code
Please check the 12th post and 13th post in this threadfor detailed code sample.
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/ff3f953b-da66-4f03-b4e4-981bab7d783b/


Method 4.ExecuteSelect/Insert/Delete/Update T-SQL commandsin VB.NET code
Code sample: How toSelect/Insert/Delete/Updaterecords in MS Access databasein VB.NET
http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/87913f28-992d-4705-963b-cb0ffa53d8dd/
Code sample: How toSelect/Insert/Delete/Updaterecords in SQL Serverdatabasein VB.NET
http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/89e1067d-16e7-44e8-b12d-d78845bf255f/



Best regards,
Martin Xie


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Martin Xie - MSFT  21 hours 4 minutes ago
If you are looking for a book, then I would suggest "Visual Basic Express Edition 2008 for Dummies" While the title puts a few people off, they are very good books - I used them to learn the language. There is a large section on working with databases. HaydenHaddock
HaydenHaddock  12 hours 40 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• VB.Net Test Connection Problem
• importing my classes into a test program
• Frame Scroll Event - vba Excel 2007
• Case Else bug?
• Multiple Argument Combos
• slow serial i/o
• Using SendKeys routine
• Conversion of an array to generic.list
• Found a solution to an annoying bug with "shifting" controls
• Publish the Application