473,396 Members | 2,024 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.

VB.net, OLEDataConnectors and Access... DB Not updating?!

Hey all,

I'm new around here but do Admin over @ PHPHelp.com... I've been developing a project for my degree which is basically based around an ATM machine.

Basically my problem is related to the updating of the database, I can't seem to see why it doesn't do anything despite no errors showing up...

Just a bit of background first..

DT is a data tables globally declared within my class...

Basically this problem applies to add a new row and updating a existing one. Although the data table HAS updating (I can check via echoing the related field) the ole connection doesn't appear to actually send it to the db

My new field query is:
Expand|Select|Wrap|Line Numbers
  1.         Query("SELECT [accountNumber],[cardNumber],[transationAmount] FROM transactions") ',[transactionDate] // Populates the data table.. works fine
  2.         MsgBox(dt.Columns.Count)
  3.         Try
  4.             newRecord = dt.NewRow
  5.  
  6.             newRecord("accountNumber") = CStr(Me.accountNum) '
  7.             newRecord("cardNumber") = CStr(Me.cardNum) '
  8.             newRecord("transationAmount") = CStr(amount) '
  9.             dt.Rows.Add(newRecord)
  10.             updateData() 
  11.         Catch ex As Exception
  12.             Form1.msgReturn(ex.Message, Form1.rtnInital)
  13.         End Try
the actual update function is:
Expand|Select|Wrap|Line Numbers
  1.     Private Function updateData()
  2.         dt.AcceptChanges()
  3.         'MsgBox(dt.Rows(0)("accountBalence"))
  4.         Try
  5.             Dim cmdbuilder As New OleDb.OleDbCommandBuilder(Form1.OleDbDataAdapter1)
  6.             Form1.OleDbDataAdapter1.Update(dt)
  7.             Return True
  8.         Catch ex As Exception
  9.             dt.Clear() 'Removes previous data set
  10.             MsgBox(ex.Message)
  11.             Return False
  12.         End Try
  13.  
  14.     End Function
Does anyone have any ideas... my head hurts :P
Feb 9 '07 #1
0 983

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hal Vaughan | last post by:
First, I am aware of both SwingUtilities.invokeLater(), and of using Thread to create a new thread.  These are part of the problem. I want to have something running in the background, while the...
7
by: Bob | last post by:
Currently I am using this statement to translate 3 fields in my db thru Visual Basic. I import the data from one table to another then call the IFF statements and the NewDate to translate the...
0
by: htmlgeek | last post by:
I'm adding and updating records in an Access .mdb via WWW .asp page. Authored in Dreamweaver 2004 MX. Help is welcome on this one. I have a great set of pages that work fine, but it seems that...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
1
by: gaosul | last post by:
I am non-programming scientist and I am using a Program called Easyarticles from Synaptosoft Inc., which is based the database program Access. Unfortunately, the owner of this company has...
9
by: Roger Down | last post by:
Lets say I have a method UpdateCache() called from a single thread. I also have a method GetCache() called from multiple threads. When UpdateCache() is called, the cache updating is being...
0
by: | last post by:
I am updating MS access tables with data in an xml document. I create two dataset, one for existing data and one for new data. I fill the first dataset with the records from MS Access, the second...
1
by: Mark | last post by:
I'm having a problem updating recordsin an Access DB table. I can update other tables in this db with no problem, and I can dreate new record in all of the tables (including this one.)> But I can't...
22
by: Deano | last post by:
Hi, I have a finished Microsoft Access app that we are distributing using an Access runtime. This works fine (mostly) but I'm sold on the advantages of dot.NET and upgrading to vb.NET seems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.