473,569 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.net, OLEDataConnecto rs and Access... DB Not updating?!

1 New Member
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 993

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

Similar topics

2
4898
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 GUI is updating.  I've done that before without a problem, however, now, I need to pass variables to the separate Thread or Runnable that I'm...
7
35666
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 fields. Can this be done in an Access db? I am trying to learn how to do these things in Access vs Visual Dim strIIF As String Dim sstrIIF As String...
0
1744
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 insert or update pages don't always work now on some records . . . It seems that when lots of text is shoved into a memo fields the database ID...
49
14296
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 application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. ...
1
2025
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 disappeared even though his website still functions. As the program requires updating, I was wondering whether anyone has any suggestions, as to what I...
9
1707
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 processed. This can take time. In the mean time, some of the multiple threads have called GetCache(), but because the cache is being updated, I want them...
0
1757
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 with data from the xml Document. Both datasets are populated properly. When the new data contains records that exist in the existing Access table...
1
1228
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 seem to update it. I keep getting this error: System.Data.OleDb.OleDbException: Data type mismatch in criteria expression from this line:
22
2208
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 like a good idea for the future. I'm also keen to develop new software in vb.NET as soon as possible. I will work out how to port the app and how to...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6287
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.