473,326 Members | 2,588 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,326 software developers and data experts.

Help Clearing Data in Data Table

10
I am using the code below to connect to a Access database and the first time roumd it works perfectly but then it errors. I think that the datatable might need clearing but i dont no how to do this. Can anybody tell me ho to solve this problem?? Thanks

Dim connStr As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = G2G.mdb"
Dim squlStr As String = "SELECT * From Staff WHERE ((Staff_No=" & StaffnoTxt.Text & "))"
Dim oleDbStaffAdapter As New OleDb.OleDbDataAdapter(squlStr, connStr)
Dim oDataTable As New DataTable


oleDbStaffAdapter.Fill(oDataTable)
FnameTxt.DataBindings.Add(New Binding("Text", oDataTable, "First_Name"))
LastnameTxt.DataBindings.Add(New Binding("Text", oDataTable, "Surname"))
NoTxt.DataBindings.Add(New Binding("Text", oDataTable, "Tel_No"))
PcodeTxt.DataBindings.Add(New Binding("Text", oDataTable, "Post_Code"))
DoornoTxt.DataBindings.Add(New Binding("Text", oDataTable, "House"))

Thanks
Dec 4 '07 #1
1 995
Plater
7,872 Expert 4TB
It looks ok to me?
Maybe there is something about the DataBindings stuff restricting your ability to overwrite the data in a DataTable?
Dec 4 '07 #2

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

Similar topics

8
by: Foxy Kav | last post by:
Hi everyone, Im currently doing first year UNI, taking a programming course in C++, for one project i have to create a simple array manipulator... that i have done, but i cant figure out how to...
3
by: RSH | last post by:
Hi, I have a situation where I have a datagridview on a form. I am making a dynamic table editor where users select a database table and then it calls this function where the data in the...
15
by: tmax | last post by:
PHP Pros: I have a simple html form that submits data to a php script, which processes it, and then redisplays the same page, but with a "thank you" message in place of the html form. This is...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
23
by: Phille | last post by:
Hi! I'm loosing my nerves!!! I normaly use Access 2003 but for the moment Access 2007 Trial and i'm not familiar with the VBA language nor SQL. I'm making a form where i add data into text/list...
1
by: kelharis | last post by:
Hello, I am writing a program that will run once, and once done, ask the user if they would like to use it again. It has to work with any answer beginning with "y". I am having trouble with...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
4
by: Polar | last post by:
Hello everyone! I'm new here. I am doing a project, Digital Compass Navigation Aids. It consists of the 1490 Digital Compass, a P18F4620 Microcontroller, ISD2560 voice record/playback chip LM4808M...
1
by: Esteban404 | last post by:
//using C# 2005, MS SQL 2000(prod) and SQL Express 2005 (dev) My sprocs all have a clearing mechanism at the end like this for each temporary table I use: --drop temporary tables IF...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.