I have created a table by running a script from my code. I have also
created a matching dataset
loaded with data for this new table. I now have to get the data in the
dataset into the table.
I figured I would create a SqlDataAdapter and a SqlCommandBuilder and then
use ado.net to do my
update as follows....
sql = "SELECT SubID, Code, State, Market, CrewCount, DayRate, NightRate,
HolidayRate " & _
"FROM(SubServices)"
Dim da As New SqlDataAdapter(sql, cn)
Dim cb As New SqlCommandBuilder(da)
da.Update(newSSDS)
but this gets the following exception...
system.invalidOperationException
Unable to find tableMapping['Table'] or datatable 'Table'
Why am I getting this? Is there an easier way to do this?
TIA
G. 2 949
Where in your code do you actually populate dataset with data? You need to use .Fill method of dataAdapter to do that.
something like this:
da.Fill(Mydataset, "TableName")
"G. Dean Blake" wrote: I have created a table by running a script from my code. I have also created a matching dataset loaded with data for this new table. I now have to get the data in the dataset into the table.
I figured I would create a SqlDataAdapter and a SqlCommandBuilder and then use ado.net to do my
update as follows.... sql = "SELECT SubID, Code, State, Market, CrewCount, DayRate, NightRate, HolidayRate " & _ "FROM(SubServices)" Dim da As New SqlDataAdapter(sql, cn) Dim cb As New SqlCommandBuilder(da) da.Update(newSSDS)
but this gets the following exception...
system.invalidOperationException
Unable to find tableMapping['Table'] or datatable 'Table'
Why am I getting this? Is there an easier way to do this? TIA G.
I did that of course. I didn't want to post my entire program. I built the
dataset in other code.
G
"Lenn" <Le**@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com... Where in your code do you actually populate dataset with data? You need to
use .Fill method of dataAdapter to do that. something like this: da.Fill(Mydataset, "TableName")
"G. Dean Blake" wrote:
I have created a table by running a script from my code. I have also created a matching dataset loaded with data for this new table. I now have to get the data in the dataset into the table.
I figured I would create a SqlDataAdapter and a SqlCommandBuilder and
then use ado.net to do my
update as follows.... sql = "SELECT SubID, Code, State, Market, CrewCount, DayRate,
NightRate, HolidayRate " & _ "FROM(SubServices)" Dim da As New SqlDataAdapter(sql, cn) Dim cb As New SqlCommandBuilder(da) da.Update(newSSDS)
but this gets the following exception...
system.invalidOperationException
Unable to find tableMapping['Table'] or datatable 'Table'
Why am I getting this? Is there an easier way to do this? TIA G. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jason |
last post by:
Let's say I have an html form with 20 or 30 fields in it. The form
submits the fields via POST to a php page which updates a table in a
database with the $_POST vars. Which makes more sense?
...
|
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...
|
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...
|
by: junglist |
last post by:
Hi guys,
I've been trying to implement an editable datagrid and i have been
succesful up to the point where i can update my datagrid row by row.
However what used to happen was that once i updated...
|
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...
|
by: jaYPee |
last post by:
does anyone experienced slowness when updating a dataset using
AcceptChanges?
when calling this code it takes many seconds to update the database
SqlDataAdapter1.Update(DsStudentCourse1)...
|
by: el_sid |
last post by:
Our developers have experienced a problem with updating Web References in
Visual Studio.NET 2003.
Normally, when a web service class (.asmx) is created, updating the Web
Reference will...
|
by: Geoff |
last post by:
Hi
I'm hoping somebody can help me with the following problem that has occurred
to me.
Suppose I have two tables in an SQL Server database. Let's call these tables
A and B. Assume that A has...
|
by: teammcs |
last post by:
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...
|
by: rosaryshop |
last post by:
I'm working a jewelry/rosary design web site at http://www.rosaryshop.com/rosariesAndKits2.php.
As the user makes selections, it updates images of various parts, giving them a preview of the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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: 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,...
|
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...
| |