473,396 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connecting between VB.Net 2005 and MS ACCESS 2003

My question has to do with the connection between these two. Right
now on the userform I have textboxes for the user to input values.

What I want to do is to have buttons with the names of ADD Record,
MODIFY Record, and DELETE Record.
I don't know how to connect with the database in MS ACCESS and edit
it
accordingly with the textboxes. I know how to do it using a
DataGridView, though.
I've done research and saw SQL statements for each button action, but
when I enter that in my boilerplate nothing happens.
For EXAMPLE:
Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnAdd.Click
City = txtCity.Text
Country = txtCountry.Text
p2005 = txt2005.Text
p2015 = txt2015.Text
Dim dt As New DataTable()
Dim connStr As String = "Proficer = Microsoft.Jet.oledb.4.0;"
& "Data Source=F:\Pham\megacities.mdb"
Dim sqlStr As String = "INSERT INTO Cities VALUES(city,
country, p2005, p2015)"
'Would it be okay to have this as my SQL string?:
'"INSERT INTO Cities VALUES(txtCity.text, txtCountry.text,
txt2005.text, txt2015.text)"
Dim dataadapter As New OleDb.OleDbDataAdapter(sqlStr,
connStr)
dataadapter.Fill(dt)
dataadapter.Dispose()
Can anyone help? Or have suggestions?
Thanks! =)

Feb 19 '07 #1
0 1206

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Guillermo | last post by:
Gentlemen, I have a VB6 Project. Works fine in my PC, but once uploaded to my website it can't connect to my Access database. Questions: 1. Can VB.net connect with Access 2003 databases hosted in...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
1
by: Decidion | last post by:
I received a copy of VB.NET 2003 standard from Microsoft as part of a promotion by viewing ASP.NET webcasts. Included was an ASP training CD and "ASP.NET Programming with Visual Basic.NET" by G....
3
by: Decidion | last post by:
I received a copy of VB.NET 2003 standard from Microsoft as part of a promotion by viewing ASP.NET webcasts. Included was an ASP training CD and "ASP.NET Programming with Visual Basic.NET" by G....
0
by: Rico | last post by:
Hello, I have an ASP web app with an SQL back end. It's currently connecting to an SQL Server 2000 database using an ODBC DSN. I am currently migrating to a new Windows 2003 Server machine...
3
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000...
10
by: MVChauhan | last post by:
Hi We are planning to move over to SQL Server 2005 in near future. At the moment Website is on a seperate server then the Database. OS for both the server is Window 2003 and currently our data...
3
by: Chris | last post by:
Don't know if there is a simple solution for this one or not. When running SQL server on a machine with 2000 loaded and the complete SQL package I don't have any issues. Now I'm trying to login...
3
by: Me LK | last post by:
I did a search but could not find an aswer that worked so here it goes. I just did an upgrade from 2003 to vs 2005 express. I am using a remote sql server 2000. I specifically upgrade to make...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.