Using a Windows Application Form I have about 20-30 fields displayed on a
Form that are bound to a dataset.
Rather than create a large SQL command/Stored Procedure to insert each of
these fields, can I not use the CommandBuilder and the Databinding?
I cannot work out how to force the dataset's DataRowState to "Added"
Am I missing something really simple or is this something that cannot be done?
Any help greatly appreciated. 9 1756
Supa, Am I missing something really simple or is this something that cannot be
done?
When I understand your message well, probably yes.
BindingContext(ds.Tables(0)).EndCurrentEdit()
I hope this helps?
Cor
Supa,
Did you try what I showed in your showbutton procedure?
Cor
savebutton Did you try what I showed in your showbutton procedure?
Yes I tried that, but the dataset.haschanges(DataRowState) still = modified.
How do I get it to ADD/INSERT a new record?
"Cor Ligthert" wrote: savebutton Did you try what I showed in your showbutton procedure?
Hi Suspa,
The dataset haschanges is for all tables and all rows in a dataset. I wished
there was a datatable.haschanges because now you are forced to use seperated
datasets when you want to update some tables in advance.
When you want individual rows checked, you have to check those using the
row, what is possible as well. http://msdn.microsoft.com/library/de...statetopic.asp
I hope this helps?
Cor Yes I tried that, but the dataset.haschanges(DataRowState) still =
modified. How do I get it to ADD/INSERT a new record?
"Cor Ligthert" wrote:
savebutton Did you try what I showed in your showbutton procedure?
Do you have an answer to this issue yet?
I have the same problem. I add a row to a DataTable (at which point the
RowState is "Added"), but I let the user change values before I insert to the
DB. The RowState has changed to "Modified" so my insert doesn't happen.
Tried creating a new DataTable to use for inserts and using the Copy() and
ImportRow() methods but they all take the "Modified" row state with them.
"Supa Hoopsa" wrote: Using a Windows Application Form I have about 20-30 fields displayed on a Form that are bound to a dataset.
Rather than create a large SQL command/Stored Procedure to insert each of these fields, can I not use the CommandBuilder and the Databinding?
I cannot work out how to force the dataset's DataRowState to "Added"
Am I missing something really simple or is this something that cannot be done?
Any help greatly appreciated.
On Thu, 30 Sep 2004 20:19:01 -0700, "Mash"
<Ma**@discussions.microsoft.com> wrote: Do you have an answer to this issue yet?
I have the same problem. I add a row to a DataTable (at which point the RowState is "Added"), but I let the user change values before I insert to the DB. The RowState has changed to "Modified" so my insert doesn't happen.
Tried creating a new DataTable to use for inserts and using the Copy() and ImportRow() methods but they all take the "Modified" row state with them.
"Supa Hoopsa" wrote:
Using a Windows Application Form I have about 20-30 fields displayed on a Form that are bound to a dataset.
Rather than create a large SQL command/Stored Procedure to insert each of these fields, can I not use the CommandBuilder and the Databinding?
I cannot work out how to force the dataset's DataRowState to "Added"
Am I missing something really simple or is this something that cannot be done?
Any help greatly appreciated.
Dear Mash,
In our limited experience we've found that the RowState value of a
newly added row is "Added" until "AcceptChanges()" is called - even
if the user changes the data in the newly added row.
Are you sure you haven't called "AcceptChanges()" somewhere in your
program?
I'm interested in the problem, so if you can post the fewest possible
lines of code to illustrate the problem then I'd be happy to have a
closer look.
Regards
Neil Allen
Hi Neil,
Yep - you got me. On the 23rd look through the code there was indeed an
AcceptChanges() call out there screwing me up. Working great now of course!
Thanks for replying...
"Neil Allen" wrote: On Thu, 30 Sep 2004 20:19:01 -0700, "Mash" <Ma**@discussions.microsoft.com> wrote:
Do you have an answer to this issue yet?
I have the same problem. I add a row to a DataTable (at which point the RowState is "Added"), but I let the user change values before I insert to the DB. The RowState has changed to "Modified" so my insert doesn't happen.
Tried creating a new DataTable to use for inserts and using the Copy() and ImportRow() methods but they all take the "Modified" row state with them.
"Supa Hoopsa" wrote:
Using a Windows Application Form I have about 20-30 fields displayed on a Form that are bound to a dataset.
Rather than create a large SQL command/Stored Procedure to insert each of these fields, can I not use the CommandBuilder and the Databinding?
I cannot work out how to force the dataset's DataRowState to "Added"
Am I missing something really simple or is this something that cannot be done?
Any help greatly appreciated.
Dear Mash,
In our limited experience we've found that the RowState value of a newly added row is "Added" until "AcceptChanges()" is called - even if the user changes the data in the newly added row.
Are you sure you haven't called "AcceptChanges()" somewhere in your program?
I'm interested in the problem, so if you can post the fewest possible lines of code to illustrate the problem then I'd be happy to have a closer look.
Regards
Neil Allen
On Fri, 1 Oct 2004 15:17:08 -0700, "Mash"
<Ma**@discussions.microsoft.com> wrote: Hi Neil,
Yep - you got me. On the 23rd look through the code there was indeed an AcceptChanges() call out there screwing me up. Working great now of course!
Thanks for replying...
"Neil Allen" wrote:
On Thu, 30 Sep 2004 20:19:01 -0700, "Mash" <Ma**@discussions.microsoft.com> wrote:
>Do you have an answer to this issue yet? > >I have the same problem. I add a row to a DataTable (at which point the >RowState is "Added"), but I let the user change values before I insert to the >DB. The RowState has changed to "Modified" so my insert doesn't happen. > >Tried creating a new DataTable to use for inserts and using the Copy() and >ImportRow() methods but they all take the "Modified" row state with them. >
<snip>
Dear Mash
Jolly good!
Regards
Neil Allen This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tony Clarke |
last post by:
Hi,
I'm trying to write a system thats used for about 50 clients that uses html
forms and php to log details. The problem is that when a client loads the
form page it's given a value which is...
|
by: Max |
last post by:
Hello everyone, and thank you in advance for all of your help!
I have a tblPrint table in Access 2002. Its structure is as follows:
tblPrint
------------------
Name, Text
Address1, Text...
|
by: Bart |
last post by:
Hi,
I receive an utf8 character from a database, like 田 (Japanese
Character, style: &#XXXXX).
How can I visualize the Japanese character on my application? I have found
the class...
|
by: Supa Hoopsa |
last post by:
Using a Windows Application Form I have about 20-30 fields displayed on a
Form that are bound to a dataset.
Rather than create a large SQL command/Stored Procedure to insert each of
these...
|
by: dirk van waes |
last post by:
Hello everyone,
Being complete newbie in asp.net I am trying to make an example which works
with a very simple database.
First I made my project in VS- vb.net, draging an oledbconnection and an...
|
by: JNariss |
last post by:
Hello,
I have created a connection to my Access database with Dreamweaver and
made a simple form with 4 fields.
The code behind this form was/is:
<%@LANGUAGE="VBCRIPT" CODEPAGE="1252"%>...
|
by: jeffmagill |
last post by:
Hi Everybody,
I'm really hoping that someone can help me out because I have spent too
much time on this project already!
Basically, I have a DetailsView that handles all the Edits for a...
|
by: Mike |
last post by:
Greetings,
It would seem that this topic has been discussed at some length, but I
was unable to discern whether there was a clear cut solution to resolve
and/or otherwise workaround the issue.
...
|
by: Kyle K. |
last post by:
I would like to build my data pages such that the top of the page
contains a GridView showing the data with 'Enable Select = true'.
Below that I would like to have a FormView, that by default is...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
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: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
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...
| |