Samant B Jain's Q&A profile
Visual Studio Error code 2337 in Visual SourceSafe
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2337. run first wcu\dotNetFramework\dotnetfx.exe maybe fix the problem ...Show All
Visual C++ How to solve problem occupying large memory?
hi, now i am developping a software based on c/s, when i send a command to server, the server will return the result, but i don't know the size of the result, if the size of result is very large, it will occupy large memory, i try to use memory-map file to solve the problem, but it occupies more memory, i don't know if my use of memory-map file is rigth, who has better method to solve problem or has experience about the similiar problem thks & Regards If you want to know the size of the buffer which is always chage dynamically, you may have to stick with some specific format like size+buffer i.e. you read the first bytes (say 4 bytes) as size and allocate enough memory, on receiveing buffer ...Show All
Visual C# how to give online updations for My own software?
I have done one desktop application in visual c#, i want to give online updations for that software . i need full flow and coding for this. there are multiple ways of doing what you are asking but no doubt ciickonce would be the most appropriate way of updating your application. I have done previously (this was for .NET 1.1) a webservice which checks for updates on the server based on what my client application has sent in terms of details for itself, so when the webservice looks at the details sent from the client, it will then try to go through the files on the server to find an update for the client software, if there is one then it will send it down the wire to them, the client then accepts this and writes data to disk and no ...Show All
SQL Server Carriage return in header of Flat File Destination
I'm trying to create a flat file that has a header like: /INST=-1 /DELIMITER="," /FIELDS=FIELD1,FIELD2,FIELD3,FIELD4 /LOCATION=100 data,data,data,data data,data,data,data where 'data' represents the data written out by the data flow process to the flat file destination. This actually turns out quite nice except that when I place the lines that start with '/' in the header box for the flat file destination the carriage return doesn't get written correctly after each line and I end up with an unrecognized character when I open the file in a simple app like notepad. I've tried using different encodings for the flat file connection, but to no avail. It is also interesting to note that when I close the package and reopen it the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What's the correct way to do rendering in a new thread in XNA (especially on XBOX360)
Hi, in a project I need to do rendering in a new thread (not in overide draw() method) The thread function is like this: private void RenderThread() { for (; ; ) { graphics.GraphicsDevice.Clear(Color.CornflowerBlue); //Copy any parent transforms Matrix[] transforms = new Matrix[myModel.Bones.Count]; myModel.CopyAbsoluteBoneTransformsTo(transforms); //Draw the model, a model can have multiple meshes, so loop foreach (ModelMesh mesh in myModel.Meshes) { //This is where the mesh orientation is set, as well as our camera and projection foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = trans ...Show All
Smart Device Development Problems adding an Item to a ComboBox
Hi everyone, I'm working on a smart client app and I want to populate a ComboBox with Vendors. The follwing code does the trick and everyting works: ddVendorList.DataSource = dsBOLsToShip.Tables[0]; ddVendorList.DisplayMember = "vendorName" ; ddVendorList.ValueMember = "binReturnHeaderID" ; BUT... when I try to add righ under a Select option as follows I get an error message ddVendorList.Items.Insert(0, "Select...." ); or Even this: ddVendorList.Items.Add( "Select...." ); I get the following exception: "Value does not fall within the expected range." I can add to the list no problem as long as I don't map a DataSource.. why is this happening and what is the work arou ...Show All
SQL Server Really basic question about inserting data into a SQL database
Hi everyone, I'm new to programming, and trying to learn and can't seem to find a clear-cut answer on how to insert text from a textbox into a database as a new record. I have a textbox and a button that when the button_click even is fired, that it will insert the data from the textbox as a new record. Any help will be greatly appreciated!! If it's SQL Server you can do something like this (in C#) SqlConnection conn = new SqlConnection ( "Server=<servername>;Database=<dbName>;Integrated Security=true" ); conn.Open(); string sql = "Insert into.... the rest of your insert statement" ; SqlCommand cmd = new SqlCommand (sql, conn); cmd.ExecuteNonQuery(); conn.Close( ...Show All
Visual Studio Team System R
Maybe a Bug in Visual Studio 2005 SP 1 !!! I'm able to reproduce on different machines with Windows XP and Vista with (Vista Update for VS SP1) Problem: 1. Start Solution and run Tests - works fine as desired. 2. Rerun Tests - VS freezes and processorload becomes 50% Additional Information: We have a Solution with ~ 95 Projects and the tests are grouped together in ordered tests. Is someone out there who has similar problems or can help Greets, Helmut I have a similar problem that occured just today (running Vista with VS SP1 for a while already): Whenever a debug point is hit, Vista totally freezes up and the only thing that helps is a reboot. ...Show All
Visual C# Hook and unhook and event using delegate
Q1. Is it possible to check if an event is being hooked for eg. cbxXXX.selectedvaluechanged += delegate { .....;} Any way to check the above event is being hooked Q2. How is it possible to unhook the above event once hooked i tried -= but it doesnt work correctly. Thanks Regards Alu well in that case this means i have to be careful when the application load initially and make sure it wont move into the events ...right :) maybe a focused check may help Thanks!. Regards Alu ...Show All
Visual Studio 2008 (Pre-release) ListView sorting
I have a ListView with sorting. In my ListView I have the header names distinct from properties of object to witch the ListView bound. So I can't use sorting parameter as string sortBy = headerClicked.Column.Header as string ; I tried to add x:Name to GridViewColumn, but in code I can't get it (Name=""). My question is - What parameter can I use in order to sort ListView void GridViewColumnHeaderClickedHandler(object sender, RoutedEventArgs e) { GridViewColumnHeader headerClicked = e.OriginalSource as GridViewColumnHeader; sortBy = headerClicked.Column.Header as string; ..............} < ListView GridViewColumnHeader.Click = " GridViewColumnHeaderClickedHandler " ...Show All
Visual C# Sending message to dialog form
How can I change text in TexBox of dialog window 1st line (in code posted earlier) running some application and 3rd line (with SendMessage) is displaying dialogbox with TextBox. My application isn't responding while dialogbox is displayed. When I close this dialog my app works fine. I think that I must run this application in some other way or change some attributes of _proces object to make my app works while dialogbox in other application is displayed. ...Show All
Windows Forms DataGridViewRadioButton Cell, Column
Hi, i'm trying to use the DataGridViewRadioButton Cell, Column, but I need to show an Image instead of a string. Is there a way to do that Thanks Can you post sample code for the same The article seems to be for developers who has good background on windows controls.I am very new and my first project in winforms.could you suggest from where to start ...Show All
Visual C++ Adding objects to ArrayList?
Hi, I want to use an ArrayList to store objects (see below) ArrayList *arrylst = new ArrayList(); MyClass1 *class1 = new MyClass1(); arrylst->Add(class1); However, it gives me an error saying it can’t convert class1 to type object. My question is how can I get it to work Thanks for your help! No, use std::vector, or one of the other STL containers. #include <vector> std::vector<MyClass1*> v; v.push_back(class1); ...Show All
Visual Studio Express Editions Backgroundworker copyfiles with progressbar
with reference to ahmedilyas code below to copy specific file types with progressbar... how can I run this code with progressbar in a backgroundworker and trigger the progressbar progress http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=833129&SiteID=1 Dim theExtentions() As String = { "*.jpg" , "*.bmp" } For Each currentExt As String In theExtentions Me .ProgressBar1.Minimum = 1 Dim theFiles() As String = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), currentExt, SearchOption.AllDirectories) Me .ProgressBar1.Maximum = theFiles.Length Me .ProgressBar1.Value = 1 Me .ProgressBar1.Step = 1 For Each currentFile ...Show All
SQL Server Different execution timing
I'm using SQL 2k. I wrote a query using the query analizer and tested it before turning it into a Stored Procedure. It worked fine an the execution time was acceptable (25 secs, since there was a lot of data to analize) When I executed the recently created stored procedure, the execution time happened to be three or four times higher. (1 min, 38 secs) It was the exact same code, i was logged in the same database server, the parameters were the same in btoh cases. So, my question is as follows: Why is it that executing a script and executing a stored procedure with the exact same script differ so much in timing Can you post some sample code Most probably you parameterized the values in the ...Show All
