Emadkb's Q&A profile
Windows Forms DataGridView Fill problem
Hi, I fill a DataGrid View control. I have a DataGridView control and a combo box cmbCustomers. When I select a customer I fill a datagrid view control : strSql = "SELECT Article_id, ArticleName, ArticleUnitPrice" strCnn = My .Settings.EmsPrintConnectionString Dim Cnn As New SqlConnection(strCnn) Dim cmdGrid As New SqlCommand(strSql, Cnn) cmdGrid.CommandType = CommandType.Text Cnn.Open() Dim sdrGrid As SqlDataReader = cmdGrid.ExecuteReader Dim intCol As Integer With sdrGrid DGVArticles.Rows.Clear() If .HasRows Then For intCol = 0 To .FieldCount - 1 DGVArticles.Columns.Add(.GetName(intCol), .GetName(intCol)) Next While .Read Dim ob ...Show All
SQL Server How do you Load .JPG Files into a image datatype column
I have been fighting with this all day. If you can point me in the right direction I'd appreiciate it. I need to load about 500 jpg files into a table. The table has 3 columns an "ID" , "Filename" which has the filename of the jpg in it already, but not the unc path, and a ("Photo" Image Datatype) column which is not populated yet. I need to store the Image file in the photo field so that I can run reports in reporting services and so on and so forth. I am not sure how to complete this task. ...Show All
Smart Device Development Smartphone 2003
Hi! I want to write a game for a Smartphone 2003 using .Net Compact Framework (C#). I would like this game to be multiplayer to using Bluetooth. Please tell me a simple way to do this! A sample Bluetooth chat application would be perfect. It is the "simple way". Just keep in mind game development is not for beginners in general. It takes 5-6 good developers with years of experience and ~6-8 months to make a simple $10 casual game. It takes tens of millions and numerous man-years to make an AAA title. Don’t expect you can just drag and drop couple thing and get your game done. It’s not there yet even on modern gaming hardware like Xbox with XNA studio, much less on an older p ...Show All
Visual Basic Very slow transfer over internet
Hello, I am using Visual Basic in VS 2005 to create websites. I have a site that is not really that big, but not really small either. I use the copy feature upload the files to the website, and it is really slow. If I use CuteFTP it takes about 15 minutes. If I use the Visual Basic IDE it takes over an hour. I have a five megs a second down and 1.5 megs a second up, and both directions are really slow. I prefer to use VS so that I can see what files are changed and what files aren't, but I can't spend so much time if I make changes to a lot of files. Is this a bug Is anyone else having this problem Are there some settings I might need to change I have only been using VS 2005 for about a month, so any help would be great. One ...Show All
SQL Server Newbie: location of Reporting Services and IIS
Can I install the Sql 2005 Reporting Services databases on one server (without IIS), install IIS on anoher server, and then point IIS to the reporting databases (The database server currently is a sql 2000, not 2005, server). TIA, barkingdog ...Show All
Smart Device Development memory critically low
i'm developing a device application for a pocket pc and when my application deploys in the device, i get this error "memory is critically low. you must select one task to terminate or increase the amount of program memory" i already did the increasing of program memory but still the memory is too small to run my application. and i can't delete/move any file using file explorer, because i haven't even stored a file besides my application. how to avoid this kind of error i really need help.. hi sir can u give sample application to 1) show how much memory are used on smart device environment as comapared to total memeory usage present in device 2)how much processor percentages are ...Show All
Visual Studio 2008 (Pre-release) generate xaml from code
hi, I am creating children of a canvas from my code (C#) in runtime. Now, is it posisble to generate XAML from the current UI / Visual tree ...... I would like it as string...or stringbuilder Thanks and regards, brij The WPF control that i am supposed to print has several, properties The values in these properties are responsible for the rendering of the WPF control Now when i serialize it to XAML all of these properties get serialized as well, and thus gives me an excption while creating XPS document Like "System.windows.markup.nullextension" type object being added to array property is not expected type "system.int32" how do i resolve this Regard ...Show All
SQL Server How to use TSQL to monitor replication status
To monitor the status of replication in SQL 2000 we insert the resuts of sp_MShelp_replication_status into a temp table and review the status. In SQL 2005 this stored procedure has changed and now does it's own insert into execute command. Since insert execute commands can not be nested we must find another way to programically monitor replication using TSQL. We could call s ys.sp_replmonitorhelppublisherhelper but we can't seem to find it in the distribution database. It must be hidden somehow. Any ideas Thanks, Danny >> We could call sys.sp_replmonitorhelppublisherhelper but we can't seem to find it in the distribution database. What do you mean Do you mean you can call this stored proc but can't find it in manage ...Show All
Visual Studio Team System debug custom code-analysis rules
Is there a way to debug custom rules in vs2005 without using the stand-alone fxcop Thanks a lot, Mahendra. You can simply call the c:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe directly rather than go through Visual Studio. In your project properties, choose the Debug tab and add it as a external program and Visual Studio will hook onto to it automatically. ...Show All
Software Development for Windows Vista DirectShow: get_StreamLength inaccurate
Sorry for yet another DirectShow query. I'm using the IMediaDet interface to find out the footage duration and consequently the number of frames in the footage for lots of different formats. I've tried two methods to obtain the number of frames. 1. Call get_StreamLength and get_FrameRate and then multiply the stream length by the frame rate to get the number of frames. 2. Use the number of frame calculated in 1, subtract 15 from it (magic number, nasty I know but I'm getting desperate) to get a frame number 15 frames from the end of the footage, let's call it frameNumber2. Then run the graph from frameNumber2 and use the IMediaEvent interface to WaitForCompletion. Check that the event is the EC_COMPLETE event. Use the IMediaSeeking ...Show All
Windows Forms How to put new row at the top of the datagrid.
I have a comment datagrid, which store comment in desc. order( the most recent listed first) I wonder is there a way to put the new row at the top instead of bottom of the datagrid ...Show All
Visual Studio Team System Problem mapping OutlineNumber
I am trying to recreate the MSProject hierarchy in TFS. For that reason I want to map OutlineNumber to a TFS field of type string. However, when I add that mapping to TFS, I cannot create work items in Project anymore. When I select a certain work item (which has the mapped field) in Project and I leave the cell, the value I selected disappears. When I remove the OutlineNUmber mapping, there is no problem anymore. So, I know where the problem is, but I don't know where to find the solution. Surely, it must be possible to map OutlineNumber which is just a string to a string field in TFS In order to help debug this, could you help clarify exactly how you want the mapping to work Here are a few questions I have: Do you want to be ...Show All
Windows Forms ToolStrip: problem with DPI scaling
Hi I've got an application with several MDI-form, which are created dynamically at runtime. Every child-window has a toolstrip with a label and some buttons in it. The application has to adjust to the users DPI-setting. The AutoScaleMode property is fine, but as i see it, it doesn't work for the dynamically created MDIs. Because of this i scale them by myself with the Scale method. This works quite good for everything but the ToolStrip. The toolstrip scales only the buttons that are visible (not in overflow). This is really annoying, and till now, i couldn't find a workaround. Hope someone can help me here. It's easy to reproduce: create a new windows application add a toolstrip and a button to your form let your code look lik ...Show All
Visual Studio Team System Process Template change
I want to remove a few workitems I do not use in my process template. For example. I have no reason to create a "risk" workitem. I know that if you alter this xml. And remove the entries for the workitemtype that you don't want created it will work fine for any new project created using this template. (see xml below). However I don't want to create a new project, we only use one project. Is there a way I can remove the ability to create certain workitem, ie "risk" in an existing project It should no longer appear when you right click on workitems and choose "Add work item" from ProcessTemplate.xml <task id="WITs" name="WorkItemType definitions" plugin="Microsoft.Pro ...Show All
.NET Development wse910 error
This query is regarding wse3.0 hands on lab security I've written code based on WSSecurityUsername sample app, but it doesn't want to work! When I try to call a service method (which simply return a "Hello " + param string), WSE gives me following exception: WSE910 In system logs I see the followiing two errors (service and client are running on the same machine): ------ An error occured processing an outgoing fault response. Details of the error causing the processing failure: System.InvalidOperationException: WSE2011: In UsernameForCertificateAssertion, encrypted key token cannot be retrieved from the request message. Encrypted key token from the request is required to secure the response message from the service. ------ Sys ...Show All
