So I had this working last week. At least, I thought I did!
http://stackoverflow.com/questions/548091/datagridview-update
Then I start working on the project again today and am getting
"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
On
scDB.SSIS_Configurations_StagingDataTable table = (sc...
hi
I started learning learning Ado.net and got a bit stuck.
1)
If I enable connection statistics via SqlConnection.StatisticsEnabled property, then I should be able to retrieve various information ( via RetrieveStatistics() ) about actions SqlConnection instance performs. Thus, before calling the code below, I already opened a conne...
I've using the WPF DocumentViewer control to display an XPS Document like so:
viewer.Document = xpsDocument.GetFixedDocumentSequence();
When the print button inside the document viewer is clicked everything prints okay, however the name of the print job is System.Windows.Documents.FixedDocumentSequence, which is less than ideal.
How ...
in C#, is there a way to
Get the memory address stored in a
reference type variable?
Get the memory address of a
variable?
EDIT:
int i;
int* pi = &i;
How do you print out the hex value of pi?
...
Hi guys,
I'm trying to create another dll with just forms and some shell method to call an external exe while allowing my main form to run unpertubed sort of something like a pseudo multithreading. And all of these wholesome goodness are in old vb6 legacy app.
So i'm trying to decide if i should use .net to write the dll or vb6 to write...
I have a state machine workflow that responds to changes in a list item. The workflow also updates the list item; is there any way to avoid firing the OnWorkflowItem changed event when the changes were made by the workflow?
...
I am currently making an ASP.Net and C# page, which is a front end for some reports.
I also want to run some queries, from the same data source as the reports (each report uses just 1 data source).
Is it possible to extract the data source connection information from a report, using either ReportingService2005 or ReportExecutionServi...
I would like to see an example that makes the best use of the ALL operator when using a parent child reltaionship in LINQ. Can you show me one please?
...
Hi,
I'm trying to build a C++ project with a build configuration platform of x64.
It's on a new machine running a 64 bit Windows Server 2008.
When I open the build configuration manager in VS, I can't chose or create the x64 platform and the project gets skipped.
When I try to build it with MSBuild I get the error:
VCBLD0004: Project 'M...
I understand that in .NET, one needs to use Control.Invoke(delegate) to perform operations on a control. This lead me to wondering in which environments Invoke is actually required. As far as i know, it was not required in older versions of, say, Visual Basic and Pascal. In particular, what is the status of Java (possibly version-depende...
I have the following code in one of my methods:
foreach (var s in vars)
{
foreach (var type in statusList)
{
if (type.Id == s)
{
Add(new NameValuePair(type.Id, type.Text));
break;
}
}
}
This seems sort of ineffective to me, and I was wondering if there was a way to substitute...
The title says it all. Sometimes it seems that the Name and x:Name attributes are interchangeable.
So, what are the definitive differences between them, and when is it preferable to use one over the other?
Are there any performance or memory implications to using them the wrong way?
EDIT Responses so far suggest that using x:Name al...
By graph here I mean something resembling these images:
The ideal solution would:
use only managed code
allow output to a bitmap image
allow output to WPF elements
include some kind of interactive surface for displaying the graph that supports zooming, panning and reorganisation of nodes
I'm also interested in hearing about proj...
I'd like to start a reference for people who want to move from linq2sql to linq2entities and the ADO.net Entity Framework (in here called L2E). I don't want to discuss which of these two is better. I just want to create a list of differences between these two for people who want to transition from one to the other.
The basic stuff is ea...
Imagine a table with GUIDs as primary key. I would like to select a few of these rows based on their primary key. I would like to use a query like:
SELECT * FROM mytable WHERE id IN ('firstguidhere','secondguidhere');
I am using ADO.NET to query the database, so I would like to use a parametrized query instead of dynamic sql, which wo...
In my controller, I have the following:
ViewData["myList"] =
new SelectList(itemRepository.GetAll(), "Id", "Name", currentItem.Id);
And in the view I have:
<%= Html.DropDownList("myItem", (SelectList)ViewData["myList"])%>
The rendered drop down list should have the item with the Id of currentItem.Id pre-selected but it doesn't....
Is there any way to take an xml string in .net and make it easyer to read?
what i mean is can i convert this:
<element1><element2>some data</element2></element1>
to this:
<element1>
<element2>
some data
</element2>
</element1>
is there any built in class for this? as sql server 2005 seems to remove all formatting on...
I've got the following stored procedure
Create procedure psfoo ()
AS
select * from tbA
select * from tbB
I'm then accessing the data this way :
Sql Command mySqlCommand = new SqlCommand("psfoo" , DbConnection)
DataSet ds = new DataSet();
mySqlCommand.CommandType = CommandType.StoredProcedure;
SqlDataAdapter mySqlD...
This is a C++/CLI WinForms project targeting the .NET 2.0 framework. I am using Visual Studio 2008. How do I get it to work?
EDIT: Code snippet
[Serializable]
[DebuggerDisplayAttribute(L"ID={EmployeeID}")]
public ref class Employee
{
[ReadOnly(true)]
int nID;
property int EmployeeID
{
int get()
{
...
I'm getting a stack overflow when tryin to set a public property in a MasterPage from an ASPX page.
I'm making a "greeting card" editor, using a TabContainer. Each tab has a user control, and everything is updated when active tab is changed - while doing so I need to store all the data away in master page properties.
From the ASPX pag...