473,480 Members | 2268 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MySqlCommandBuilder SqlCommandBuilder Error

31 New Member
Hi Pr0's,

I have a problem trying to implement the same example from this link:

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommandbuilder.aspx

But instead of Sql I use MySql. When I fill the DataSet with the data from the DB I dont have any trouble I can even fill also a DataGridViewer and display the data in my form.

The problem is when I want to use the GetUpdateCommand. I get an exception error like "Dynamic SQL generation is not supported against multiple base tables".

So basically I get the Data from the DB and then fill the DataSet and then copy it to the DataGridView. Afterwards I modify manually the rows and then I want to update it.

Why do you think I have this problem? I just copied the code exactly from the MSDN's example and I get this error.

Thank you in advance,
Raul Bolanos.
Aug 4 '09 #1
2 3318
raulbolanos
31 New Member
My Query is something like this
Expand|Select|Wrap|Line Numbers
  1. string queryString = "SELECT xValue, yValue, specType, s.specIndex FROM (verspec s INNER JOIN verspecdata sd on s.specIndex = sd.specIndex) WHERE (productNumber = 'TEST') AND options = '000 000 000' AND specType = 0 AND curveIndex = 0 ORDER BY productNumber";
  2.  
Aug 4 '09 #2
Plater
7,872 Recognized Expert Expert
The message tells you it all. You cannot auto generate an update command if you are selecting from more then one table.
You will need to create your own update SQL command manually.
Aug 4 '09 #3

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

Similar topics

2
4357
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
1
1308
by: Nick | last post by:
Hi, The SqlCommandBuilder class seems to be able to remember the primary key of a row such that even if I change that key's value, it is still able to update only that row. So I would like to...
10
9309
by: Hank1234 | last post by:
Can I use one Data Adapter and one Command Builder to update amny tables? Currently in my data adapter I query two tables and fill them into two tables in a data set. When I make a change to a...
5
2823
by: microsoft.private.windows.netserver.setup | last post by:
I have a very strange thing occurring in the program. I have a dataset retrieved from a stored procedure that just select * from a table. I then try to use the SQlCommandBuilder on the dataset,...
4
2125
by: Jim Reynolds | last post by:
Hi, I am using a SqlCommandBuilder to update a Db table via an updated DataSet and SqlAdapter and it doesn't seem to be generating the activity commands from the Select command. Here is a snippet....
0
2592
by: DG | last post by:
I use this code: _adapter = new SqlDataAdapter(selectString, _conn); _adapter.SelectCommand = new SqlCommand(selectString, _conn); _adapter.SelectCommand.Transaction = _trans; _builder = new...
2
3157
by: nfxs | last post by:
Hi, i have writen the following code: string mySqlCommandString = "SELECT * FROM fxs_prueba"; MySqlDataAdapter mySqlDataAdapter = new MySqlDataAdapter(); mySqlDataAdapter.SelectCommand = new...
0
1137
by: Tony Johansson | last post by:
Hello! This small program below works but I have some questions about it. Below I have a piece of code that update a specific row in the northwind database. The class SqlCommandBuilder is...
1
1835
by: Tony Johansson | last post by:
Hello! When I use this SqlCommandBuilder will there be created sql command for all three sql statement(update,insert and delete) //Tony
0
7054
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
6918
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
7057
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
7102
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...
1
6756
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...
0
5357
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
4495
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...
0
1310
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
570
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.