₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,577 members, 8,427,134 topics. Date: Monday, 15 June 2026 at 12:47 PM

Toggle theme

Vb.net Help - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingVb.net Help (1304 Views)

1 Reply (Go Down)

Vb.net Help by Nobody: 10:30am On Feb 28, 2012
Dim con As New OleDb.OleDbConnection
Dim dbprovider As String
Dim dbsource As String
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String


dbprovider = "provider=microsoft.Jet.OLEDB.4.0;"
dbsource = "Data source=C:\Users\VICTOROUS ARMY\Desktop\NWIND.mdb"
con.ConnectionString = dbprovider & dbsource
con.Open()
Sql = "SELECT * FROM Employees"
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "NWIND"wink


Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("NWIND"wink.NewRow()
dsNewRow.Item("LastName"wink = TextBox1.Text
dsNewRow.Item("FirstName"wink = TextBox2.Text
ds.Tables("NWIND"wink.Rows.Add(dsNewRow)
da.Update(ds, "NWIND"wink
MsgBox("New Record added to the Database"wink



PLS ANY ONE WHO CAN HELP ME WITH CODE ON HOW TO SEARCH,DELETE,UPDATE,VALIDATE USER LOGIN,NAVIGATE RECORD IN DATABASE BUT THE ABOVE CODE IS THE CODE I USE IN SAVING RECORD
ANYONE WHO CAN HELP ME WITH THE CODE TO SEARCH,DELETE,UPDATE,VALIDATE USER LOGIN,NAVIGATE RECORD IN DATABASE WITH THE HELP OF WINDOW FORM IN MICROSOFT VISUAL BASIC
2008 EXPRESS EDITION WITH ACCESS DATABASE AND MICROSOFT SQL SERVER DATABASE
Re: Vb.net Help by dellnet: 3:50pm On Feb 28, 2012
Depends on what library you are using. Me, I prefer to use ADO so I can use SQL statements. For example to search for a username, I will get the username say from a textbox and put it in sql statement. E.g

Dim sqlquery as string = "SELECT * FROM table WHERE username=" & txtuser.text

Now I will use the above and search my db. If you are interested in using ADO you should learn the following:
1. How to connect to a database using ADO
2. How to select, update, delete a database using ADO

These are pretty easy stuffs.
Re: Vb.net Help by Kobojunkie: 5:15am On Feb 29, 2012
@Poster
dbprovider = "provider=microsoft.Jet.OLEDB.4.0;"
        dbsource = "Data source=C:\Users\VICTOROUS ARMY\Desktop\NWIND.mdb"
        con.ConnectionString = dbprovider & dbsource
Please take a look at this link to learn what a connectionString is and how to format it   . .  http://www.connectionstrings.com/Articles/Show/what-is-a-connection-string

http://www.connectionstrings.com/sql-server-2008#p2

Also, when you run code, and get an error. It is usually best if you provide us with details of the error so we can best understand what problem you are really having.
Re: Vb.net Help by AZeD1(m): 2:20pm On Feb 29, 2012
I'm more of a stored procedure person.
KoboJunkie are you a programmer?
Re: Vb.net Help by 9ja4eva: 6:48pm On Mar 03, 2012
Kobojunkie:
@Poster

Please take a look at this link to learn what a connectionString is and how to format it   . .  http://www.connectionstrings.com/Articles/Show/what-is-a-connection-string

http://www.connectionstrings.com/sql-server-2008#p2

Also, when you run code, and get an error. It is usually best if you provide us with details of the error so we can best understand what problem you are really having.
Kobo do u program in VB? I got a question for you
Re: Vb.net Help by Kobojunkie: 12:07am On Mar 04, 2012
I think I have posted a response to your question. Please check it.
Re: Vb.net Help by 9ja4eva: 6:00am On Mar 04, 2012
Yeap Boss i have checked it. I have another concern if you don't mind.
1 Reply

ASP.NET HELP!¡! Any Programmer Can Give Suggestion.I Need A Help To Write A Simple Login Form Using Vb.netPost Ur Vb 6.0 Questions Here234

Scientific Calculator Help!Hibernate Envers - EJB , Help NeededSaving And Retrieving In C++