|
Just to close it off for prosperity.
I have a data table, filled by a table adapter with '...WHERE(PK=@PK)'. It had a single row in it. I added another row (.NewRow, .AddRow). The Rows count of the table was 2. Index [0] pointed to the old origional data. Index [1] pointed to the new data, DataRowState=Added.
I then called the table adapter.update (a rather large INSERT statement)
There was still a count of two rows but both [0] and [1] pointed to the same row, the origional. This would indicate the data table of the dataset is no longer valid after an Update. I then did another fill and the data table had both rows as before (now unchanged state).
The reason for writing this is to record for other people that may fall into this minor but time consuming trap. The tableAdapter.Update call is the end of the road for the validity of the data table data. There isn't a lot of documentation or web resource that tells you this.
It maybe obvious to seasoned .NET database engineers, and maybe standard practice. It would be unexpected to new entrants in this field with experience of other, dare I say it, more normal, caching systems.
Thanks for the help.
Ooops, I modified Table Adapter to refer more correctly to the data table of the dataset where referring to storage.
|
|
|
|
|
I want to know how to make my application autorun I mean how to put it in the system startup. I want when the windows starts my main form get minimized and instead of taskbar I want to show its icon in the notification area.
Also, I need to know how can I realize when my form restores after minimizing.
I really need to know the answer as soon as possible
|
|
|
|
|
|
saeidfarahi wrote: I really need to know the answer as soon as possible
Man you should be a comedian... you seem to have a beeter angle on that then programming!
However ... TO answer your first question just put a shortcut to your application in the startup folder on windows....
Not sure on the other answer....
|
|
|
|
|
in my application i need to create our own spell checker...
actually wht i am doing is in my form i have some control like buttons,label like..when i click on spell check i need to check the all the controls Text..
so i need to create own spell check Designer..
please any one help me.......
Thanks
|
|
|
|
|
Do you honestly think that a forum reply will teach you how to write a spell checker ? Buy one, use Word, or give up.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Creating your own would be more difficult than using an existing one. There are some free solutions available, so why would you even want to create your own wordlist?
Take a look here[^] and here[^]
I are troll
|
|
|
|
|
hi
I create customize template for VS2008 in which whenever user add project using this template, i want to add folder with some files copy from some path.
i write following code as
project.ProjectItems.AddFolder("myfolder");
folder is created into explorer. i used
project.ProjectItems.AddFromFileCopy(filepath) to add files into exploer but how can i add
files into "myfolder" in explorer.
thanks
abc
|
|
|
|
|
i hav already finished half of my website, and now i wish to add ajax enabled master page to it(to show news) so that all the pages in my website can have AJAX properties. i use vs2005, hw can i do it?
|
|
|
|
|
If you're not smart enough to find the ASP.NET forum, this task is probably too hard for you
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello All
Kindly help me resolve the issue. I want to fill multiple values in a single cell of excel using c#. The values are received from a loop.
Thanks
shantanu
|
|
|
|
|
If they go in the one cell, I assume you want to build them into one string and hten insert that ? If not, please ask in a way that makes sense
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
This is ridiculous. No beginner should be working on such a thing. LEarn C# first. If this is paid work, be ashamed.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
Please let me know how can i use UrlDownloadToFile() in c# .....
|
|
|
|
|
IS it a .NET method ? If not, then perhaps you need to use p/invoke. Either way, you don't say what you want to use it for, or why you can't google it for yourself.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
this is the customer class(created by XSD) which i use to create the customer object at client
and pass to web service.
public partial class Customer {
private System.DateTime dATEOFBIRTHField;
private string cUSTEMAILField;
[System.Xml.Serialization.XmlAttributeAttribute()]
public System.DateTime DATEOFBIRTH {
get {
return this.dATEOFBIRTHField;
}
set {
this.dATEOFBIRTHField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string CUSTEMAIL {
get {
return this.cUSTEMAILField;
}
set {
this.cUSTEMAILField = value;
}
}
}
when i set the date of the customer object
customer.DATEOFBIRTH = DateTime.Today;
and pass it to web service by calling it's method at client side the time is
automatically set to "01/01/0001" . any suggestions why?
|
|
|
|
|
Hi,
the DateTime.Today property returns a value like
"03/16/09 12:00:00 AM" whereas your method's argument might need only the date or time.....
Check this and if you need to pass anyone modify your code accordingly....
Have a Happy Coding.....
|
|
|
|
|
I got this error, And here is my code . Thanks
case 64:
if (GetFunction() == true)
{
if (GetStatus() == false)
{
FunctionError();
}
else
{
Reset();
goto case 65;
}
}
|
|
|
|
|
The goto is inside the brackets. You need a break after the if, or after FunctionError()
using goto in a case statement is so ugly. THe C# team are morons for requiring us to do this. I never do it, no matter what.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Do you have any recommendations for this case ?
|
|
|
|
|
How about moving the code inside case 65 into a function and calling that from both places?
|
|
|
|
|
Yes, that's what I would do.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
because i have like 100 cases like that and i prefer not make a case into a function
|
|
|
|
|
dec82 wrote: i prefer not make a case into a function
May I know why?
|
|
|
|