VRATZ's Q&A profile
.NET Development There is already an open DataReader associated with this Command which must be closed first.
I have a rather large ASP-NET-2.0 project that I've been developing for some time. I'm using System.Data.Common classes for all of my data access, and SQL-2005 as my provider. Up to and including Beta-2, everything was working just fine and dandy. Then, with the release of RC1, I suddenly started to get the following error:: There is already an open DataReader associated with this Command which must be closed first. This totally threw me, but I dutifuly started to trace all of my connections & readers to make sure I was closing & disposing of them properly, and all appears to be correct. After a bunch of tedious and very time-consuming debugging, I've come to the conclusion that from RC1 onwards, the framework is not correctly ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How safe is it to inherits one class from XNA's GraphicsComponent?
Hi, In another thread, somebody gave me a link about GameServices (http://blogs.msdn.com/mitchw/archive/2006/09/06/742955.aspx) and it made think about how to design a renderer inside an engine. Let's say I want the my game to have, as a GameComponent, my own renderer. I want my renderer to offer IGraphicsDeviceService and also offer the same functionality that the GraphicsComponent have without too much work. Can I simply inherits from the GraphicsComponent class Since I have no idea what's going behind the scene, it's hard to have a clear idea if it'll create bugs or not. I did a small test and it seems to work but there is nothing wrong in asking. :P Louis Inheriting from ...Show All
SQL Server Joining two tables with repeating rows
Hi. I am trying to get data from two different tables. The first table contains user access data for access to different modules of our application. There are only records for the modules that the user has access to. So if User1 can only access 2 of the 5 modules, there will be 2 User1 records. The second table lists the modules. UserAccess table: UserID ModuleID AccessLevel User1 1 1 User1 2 1 User2 1 1 Modules table: ModuleID Description 1 Mod1 2 Mod2 3 Mod3 4 Mod4 5 Mod5 What I am trying to select is a list of all modules for each user, whether they have access or not. So basically I would like the data f ...Show All
Windows Forms Adding a dragged menu item icon to a listview , What's wrong ???
Hi simply here is the situation : dragging a menu item that contains an icon from any menu and then dropping it on a listview WITH THE SAME Icon I handled the menu item MouseDown event and listview DragDrop event , in the DragDrop event I add the menu item Image to an imagelist which is 32 * 32 , and finally assign this image to the newly added listview item. the Surprise was that :- *- the icon is reversed !!! any help please Mohamed Hi sorry for my late reply , here is the code. at the menu item MouseDown event : Private Sub SimpleTestToolStripMenuItem_MouseDown( ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SimpleTestToolStripMenuItem.MouseDo ...Show All
.NET Development SqlCommand.ExecuteXmlReader and System.Reflection.TarggetInvokationException
Simple code. Exception raised, when sql query returns empty query result. code using (SqlConnection _connection = new SqlConnection(_conStr)) { sCom.Connection = _connection; _connection.Open(); xRdr = sCom.ExecuteXmlReader() // here exception } raises System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.at System.Data.SqlClient.SqlDataReader.GetBytesInternal(Int32 i, Int64 dataIndex, Byte[] buffer, Int32 bufferIndex, Int32 length) at System.Data.SqlClient.SqlStream.ReadBytes(Byte[] buffer, Int32 offset, Int32 count) at System.Data.SqlClient.SqlS ...Show All
Windows Forms Datagridview checkbox column, .net 2.o
I have a boolean field in the dataset. The dataset is the source for a datagridview. But the boolean field is not displayed as a checkbox. How do i fix this Thanks. check this out: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=793263&SiteID=1 you need to add the control in order to show the boolean value and the checkbox does this, so you need to add the checkbox control to the column of the datagridview ...Show All
Software Development for Windows Vista Persistence Exception "the partner transaction manager has disabled its support for remote/network transactions"
I get this error:... Persistence Exception: "the partner transaction manager has disabled its support for remote/network transactions" in this line:... void UnloadInstance( object workflowInstance) { ((WorkflowInstance)workflowInstance).TryUnload(); } Thanks, gracias. Searching the forum i found a post with this answer:... "If you are using SQL 2000, then you have to add SharedConnectionWorkflowCommitWorkBatchService service" workflowRuntime.AddService( new SharedConnectionWorkflowCommitWorkBatchService (opciones.ConnectionString)); Thanks anyway, igual gracias. ...Show All
Visual Studio Team System Unable to Merge
I have been unable to merge changed files from a Source to a Destination. I select the Source project and Merge. I then select the Destination and tell it to use a specific changeset. The changed file then appears in the Pending Changes tab. I select the file and Check In. A resolve files dialog then appears. There are two options: Undo local changes and Igrnore Conflict. If I select Undo local changes the file disappears from Pending Changes but never is actually merged and does not appear in the History. If I select Ignore Conflict the file still appears in Pending Changes and nothing ever happens. Is this a bug and, if so, how do I work around it SP1 does not change the way namespace confli ...Show All
Visual Studio Assigning application icon, missing "Project Designer"??
I am using microsoft visual studio 2005. I have installed the visual c++ 2005 component, and crystal reports for c++, and the .net stuff relating to c++. I have created and added a .resx resource file containing the .ico that I want to use as my application icon. I need to access the Application Pane of the Project Designer in order to set the icon. The documentation lists a number of ways to access the project designer but none of them work! To access the Application page, select a project node in Solution Explorer , then on the Project menu, click Properties . When the Project Designer appears, click the Application tab. --> this brings up the Property Pages, ...Show All
SQL Server Login failed from Windows Service
I'm building a Windows Service which keeps getting denied access to SQL Server 2k. The Service operates as a System User rather than an individual user profile. I've tried Trusted_Connection=yes and Integrated Security=SSPI but these are both denied. Any ideas what the connection string to connect to SQL Server 2k from a Wndows Service is I just tried adding NT Authority as a user but I can't see it in the list of users. I performed a search of users and 'NT Authority' wasn't found. Should 'builtin\administrator' be listed as one of the users or not Also, for distribution purposes, can whatever steps need to be taken for the Service to access the database be performed from an installation file Th ...Show All
Visual Basic How can I cycle through all the System.Drawing.Colors?
I worked out the Console version to cycle through all 16 available colors: Sub Main() Dim x, y As Integer For x = 0 To 15 Console.BackgroundColor = CType(x, ConsoleColor) Console.Clear() For y = 0 To 15 Console.ForegroundColor = CType(y, ConsoleColor) Console.WriteLine("Background: {0}; Foreground: {1}", x, y) Next y Console.ReadLine() Next x Console.ResetColor() Console.Clear() Console.WriteLine() End Sub I also worked out a program that cycles through 4 colors in a Windows form: Private Sub btnCycle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCycle.Click Static x As Integer x = x + 1 If x = 5 Then x ...Show All
.NET Development PropertyInfo.GetValue[need help]
Hello firends, I m trying to create a generalized objectArray sorting function whose prototype will look like this public object[] Sort(Object[], strPropName) The reason for creating such a Function is that I call some WebMethods of a webservice. Each webmethod returns an object[] but ,whose type differs. and i need to sort those object[]. i tried this public object [] SortObjectArray( object [] objectArrayToSort, string propertyName ) { int size = objectArrayToSort.Length; Type type = objectArrayToSort[0].GetType(); Object tempObject = System. Activator .CreateInstance(type);// this will act as temp obj for swapping during sorting for (int i = 0; i < size; i++) { for (int j = i + 1; j ...Show All
Visual Studio Team System Problem with running Continuous Integration
I am going to be running CI, and I forsee some problems that are going to arise. I am going to be having approximately 26 team build projects that are going to be running on CI. If each of those are run say 3 times a day - that will leave me with almost 80 entries in the "integration build", "found in build", "resolved in build" fields. I would like to have these builds ignored, as I have a main build which will "sweep up" all of the work items and change sets. What is the best way to do this fyi, I tried to rename my build to CI but you can't overwrite one with the same name once it has built... The build numbers are currently stuffed in by a web service which is ...Show All
Visual Studio Tools for Office Having conflict re-installing Word 02 with XP
Help! I run Windows XP with Word 2002 and all was find until last week when I accidently deleted Word 2002. Now I can't get it back. I installed the CD with it on there that came with the computer. Then I clicked on the start bar and "Microsoft Word" and it said it was installing. But then I get an error that says "This patch package could not be opened. Verify that it exists and you can access it, or contact application vendor to verify that this is a valid windows installation package." I have tried it several times with the same result. I do have a valid windows program and even went and downloaded updates to see if this would help but nothing is working. Any help appreciated. Thanks in advance, jh ...Show All
Internet Explorer Development Enabling script debugging in IE7
Hi I cannot enable script debugging in IE7. I have clicked the checkbox to off on "disable script debugging" in the advanced options, but it just won't save the option! when I restart IE, the tick has reappeared again! Can anyone help or point me in the direction of someone who can Thanks Bex If this is at work, and you are not an admin user, you IT dept, may have the IE setting locked so you can not change them. This is becoming pretty common. Although I believe it usally tells you that you can not make changes to those settings when you try. ...Show All
