|
I don't do this kind of stuff with DataTables very often, but according to the MSDN documentation...
When AcceptChanges is called, any DataRow object still in edit mode successfully ends its edits. The DataRowState also changes: all Added and Modified rows become Unchanged, and Deleted rows are removed.
So I think you should call AcceptChanges after Update to reset the status of the rows in your DataTable.
Paul
|
|
|
|
|
Yep - I agree with you.
Thanks.
Glen Harvy
|
|
|
|
|
Hi,
I have developed the habit of coding new rows etc as follows:
DataRow nr = DataSet.Tables[logName].NewRow();
nr["c-ip"] = appField[0].ToString();
nr["cs-username"] = appField[2].ToString();
this.DataSet.Tables[logName].Rows.Add(nr);
this.TableAdapter.Update(DataSet.log1);
DataSet.AcceptChanges();
Performance has raised it's head and I am wondering now why I am calling DataSet.AcceptCahges() .
Is this necessary in this instance?
Does AcceptChanges actually do anything?
Glen Harvy
|
|
|
|
|
Whilst analysing one of my stored procedures, I was curious on investigating whether there are any associated (latent/deliberate) pitfalls associated with respect to RECURSIVE Stored Procedure. From my side, I have ensured the following:
1) Currently, I have as much fine drilled the WHERE clause so that as narrowed down records as minimal are only selected for delete operation.
2) No Temp Tables have been used to prevent any deadlock even whilst entering into them.
3) From my personal preference, CURSORS are a big no-no considering the huge performance and penalty that we ought to pay for through our nose.
Should I consider any more option to ensure that it does not penalize my database for any performance issues?
|
|
|
|
|
Temp tables can infact speed up a stored procedure if there is a lot of joins in a particular select statement.
|
|
|
|
|
Dear friends,
I want to put name and leavedescription on the y axis and date on the x-axis how to do that in chart in sql report designer?
It gives me error like "more than 1 data set, dataregion, or grouping........."
I am trying this with line chart.
Plaese guide me!
|
|
|
|
|
Hai Everybody,
I have an table, in that i haven't set the primary key as a identity field.
No i want to set the primary key field to have an identity constraint without dropping column.
Either I can drop the column and add it again or else suggest me an alternate as i have given the database to the client i can't change using the GUI.
I want the script to perform the above.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Create a sample table with the same definition and dump the records. First try to set the Primary key field to have an Identity Constraint without dropping the column. It will set the Key but the Identity seed will increase from the max value that column contains and the records will also rearanged in the order of the Identity Value. Check you application whether it runs properly with these changes. and How sure are you that these change doesn't causes any negetive impact on the application side? Because It completely depends on how that particular field is handled on the application side (Including DataDefinition). At present How the value is being passed to this field from the application? If constraint changes will that create any problem?
Since Pkey is not set to that column it might have not been referencing any other table. But still dropping that column depends how that particular feild is handled on the application side. Consider all these factor and take the neccesary action...
do the verification testing before you do changes to the production database.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi ..
thanks for all here ..
on my example .. I want to save the image of a PictureBox to the Sql server 2000 database ...
I know how cant save it from a file ...
but I want to know how save the PictureBoc's image ...
jooooo
|
|
|
|
|
please i want a website which demonstrates the travel agent system showing their database design and relational tables
thanks
|
|
|
|
|
dinakatina wrote: i want a website which demonstrates the travel agent system showing their database design and relational tables
You are most unlikey to get this unless someone has used a travel agent system as an example in a text book.
Have you considered designing your own database?
|
|
|
|
|
Hi All,
I need to do a select statement with will combine two fields into one before I do the Like statement.
i.e.
Table1.SuiteNumber
Table1.Address
Table1.Country
Combine these 3 fields into one field called FullAddress
Select suitenumber + " " + Address + " " + Country AS FullAddress From Table1
THEN select particular record in the FullAddress field
Select * from Table1 where FullAddress like %Owl street%
How can I combine this two select statement into one? Please advice. Thanks in a million.
gsdg
|
|
|
|
|
SELECT suitenumber + ' ' + Address + ' ' + Country AS FullAddress
FROM Table1
WHERE suitenumber + ' ' + Address + ' ' + Country LIKE '%Owl Street%'
|
|
|
|
|
Alternatively
SELECT *
FROM (SELECT suitenumber + ' ' + Address + ' ' + Country AS FullAddress
FROM Table1) AS subquery
WHERE FullAddress LIKE '%Owl Street%'
|
|
|
|
|
i design a website about online reservation systems in travel agents ,and i face many problems database design stage one of these problems is how to display the description of the day for (certain day of certain package)
the second problem if an individual reserve online and fill the reservation form (without going to an agent that exists in his country )should i put him/her in a filegroup or not
if anyone is familiar with tourism fields and its system,please give me advice,i need it urgently,thanks a lot
|
|
|
|
|
dinakatina wrote: how to display the description of the day for (certain day of certain package)
That is an ASP.NET problem.
dinakatina wrote: if an individual reserve online and fill the reservation form (without going to an agent that exists in his country )should i put him/her in a filegroup or not
I don't know. What does your client want to happen in that situation?
|
|
|
|
|
Gotta love the people who 'need it urgently', but don't respond when you try to help.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Gotta love the people who 'need it urgently', but don't respond when you try to help.
It happens. I'm trying not to lose my cool with that sort of thing, so the odd vent on my blog helps. I'm actually trying to vent more frequently so it doesn't build up. Of course, that makes less fireworks for everyone else to see.
|
|
|
|
|
Is this a real world system ?
dinakatina wrote: if anyone is familiar with tourism fields and its system,please give me advice,i need it urgently,thanks a lot
I can only assume that you've taken a job to write this system, the real question is, why are you asking us what your client wants, instead of asking your client ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
SQL 2000 8.00.2039
I am trying to write a backup from SQL (.bak), compress it then insert into a
database.
Can someone help me with the framework of this operation?
Any input is greatly appreciated.
Regards,
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: Can someone help me with the framework of this operation?
What do you mean by "framework" in the current context?
|
|
|
|
|
Sorry I should have been more specific.
I am trying to accomplish the aformentioned operation via T-SQL.
The only way I have seen is via C# or ASP.
What would the T-SQL look like to achieve the goal of compressing a .bak file then storing the file in the database?
Could I execute a backup, compress it, then drop in the db as a blob?
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: Could I execute a backup, compress it, then drop in the db as a blob?
Yes. You could use BACKUP, xp_cmd (and call out to a zip application), but I'm not sure how to get it back in the database as I usually do that from within a C# application.
|
|
|
|
|
It looks like it have to be C3
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: It looks like it have to be C3
|
|
|
|