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

Updating Northwind Syntax Win[C#]

Hi Everyone, (Just doing a repost case my previous post was too far down the
line, sorry fro the repost)

I'm having problems with my syntax on the updating part for the
Northwind.MDB. All other code seems fine. It has to do with the Order
Details on the thisAdapter.Update( ). Or I believe the problem lies with
with space between Order and Details and not knowing how to get around that
problem. I would like to keep with the space being left in-between the two
names. The error I'm getting is The error that it is triggering is "Update
unable to find TableMapping
['[Order Details]'] or Data Table '[Order Details]'. Order Details is just
one table.

Is There a way to use a name " " name without a hassle? My Code is as
follows:

Any and all help is appreciated.
Mike

private void DataUpdate()
{
try
{

OleDbConnection thisConnection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=C:\Northwind.MDB");

thisConnection.Open();

OleDbDataAdapter thisAdapter = new OleDbDataAdapter("SELECT * FROM [Order
Details]", thisConnection);
OleDbCommandBuilder thisBuilder = new OleDbCommandBuilder(thisAdapter);

DataSet thisDataSet = new DataSet();

thisAdapter.Fill(thisDataSet, "Order Details");
thisDataSet.Tables["Order Details"].Rows[0]["Quantity"] = "99";

thisAdapter.Update(thisDataSet, "[Order Details]");
thisConnection.Close();

}
catch(Exception myExcept)
{
MessageBox.Show(myExcept.Message);
}
}


Jul 13 '06 #1
0 1208

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

Similar topics

4
by: EricP | last post by:
Hello, What are the default login/password to access pubs and northwind databases ? I remember the login = "sa", but nothing about the password. Thanks Eric
2
by: T Chaudhary | last post by:
Hi, I want to replicate the system tables of the Northwind database in another test database that I have created (say NorthwindTest). I started with the syscomments table: insert into...
6
by: Phil | last post by:
Hi, I'm new to '.net'. I'm working in vb.net and have an error don't know the cause of or how I should go about debugging it. Here is the code: Dim dsNwind As New DataSet Dim daProds As New...
1
by: Nic | last post by:
Hi - I am battling to find the a resource, so maybe some one in here can help The problem is as follows: I am trying to build a mod_perl source code editor for the web - to edit Perl source code...
3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
11
by: tomp | last post by:
Hi, I am trying to insert a row into the Categories Table in Nothwinds database in MSDE. I am able to manually insert it using a query tool. Using the Debugger, it appears the DataSet loads...
1
by: Peter | last post by:
I found one aspx page in a PC for ASPX learning, in one web control, <asp:SqlDataSource>, one of its attribute is as below: ConnectionString=<%$ConnectionStrings:Northwind %> The page works. And...
2
by: MikeY | last post by:
Hi Everyone, I'm having problems with my syntax on the updating part for the Northwind.MDB. All other code seems fine. It has to do with the Order Details on the thisAdapter.Update( ). Or I...
0
by: Eps | last post by:
Hi, I have a win form and a class library, in the library I do a long running proccess (processing a large number of files), I am planning to do this in another thread. What are my options...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.