473,387 Members | 1,441 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,387 software developers and data experts.

Save routing not working

Hi Everybody,

I am writing an application using the bindingnavigator and the oledbDataAdapter. I am not able to save the changes to the actual access database. Please help me. The code follows.

Thank you
Vishal



I have opened a connection and the following code binds the database with the bindingnavigator using a oledbDataAdapter. And also to the text box. Where we can edit the fields and later on save them.

Expand|Select|Wrap|Line Numbers
  1. Me.objDataAdapter = New OleDbDataAdapter("Select * from datatable", Me.objConnection)
  2.  
  3.         Me.objDataAdapter.Fill(Me.objDataTable)
  4.  
  5.         Me.BindingSource1.DataSource = Me.objDataTable
  6.         Me.BindingNavigator1.BindingSource = Me.BindingSource1
  7.         Me.BindingNavigator1.Dock = DockStyle.None
  8.         Me.Controls.Add(Me.BindingNavigator1)
  9.  
  10.         Me.Controls.Add(Me.RichTextBox1)
  11.         Me.RichTextBox1.DataBindings.Add(New Binding("Text", Me.BindingSource1, "audit_task_no", True))
  12.  

The following is the save routine.

Expand|Select|Wrap|Line Numbers
  1.         Try
  2.             Me.objDataAdapter.Update(Me.objDataTable)
  3.             MsgBox("Changes Successful Saved ")
  4.         Catch ex As Exception
  5.             MsgBox("Saved Failed")
  6.         End Try
  7.  
  8.         Try
  9.             Me.objDataTable.AcceptChanges()
  10.         Catch ex As Exception
  11.             MsgBox("Update failed")
  12.         End Try
  13.  
I have declared objDataAdapter and other variables gloable thats why I am using Me.objDataAdapter.
Nov 25 '06 #1
0 1099

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

Similar topics

3
by: Shiv Agarwal | last post by:
Hi, I am writing a .NET application in C#. I have to display the routing table in some formatted NMS way. Anyhow the issue is that, whenever the routing table changes I want to get an event....
1
by: Tom Weston | last post by:
Help I have created a report in access and wish to use a routing slip to email it to my line management, how can I do that? I have searched the web but not found a way to add a routing slip,...
0
by: abdulics | last post by:
Hi, We have immediate openings with one of our Top Notch Telecom clients for their Research and Development Center in Bangalore. Please send me your detailed/brief profile to...
0
by: abdulics | last post by:
Hi, We have immediate openings with one of our Top Notch Telecom clients for their Research and Development Center in Bangalore. Our top notch and reputed client deliver complex IT solutions on...
2
by: ricky | last post by:
Hi, I am student and I am doing a final year project on Zig-bee. I have to write low energy routing algorithms. I need to write routing algorithm for LEACH. If anybody can help with some links...
0
by: devidevi | last post by:
hello sir, i'm doing a project in Mobile Adhoc network in ns2 simulator i have to perform routing with AODV.. my problem is i have to disable certain nodes ( in a 20 node topology) from...
0
by: vince | last post by:
Until December, 31st, 2008 companies may obtain a free Developer License of the JOpt.NET Vehicle Routing Library The Vehicle Routing Initiative aims on software vendors that plan to incorporate...
0
by: shekharban | last post by:
Hi, Below is the raw socket program for sending routing header in ipv6 domain. My source address is fe80::21d:9ff:fe17:58c7 and destination address is fe80::21d:9ff:fe17:5d0e in the below...
0
by: scotter86 | last post by:
Hi everyone, I'm somewhat new to Linux, and completely new to OpenVPN. But here is my situation, I have OpenVPN Installed on my server runing Ubuntu 7.10. I also have wandered through tutorials...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.