CBuilder's Q&A profile
Visual Studio 2008 (Pre-release) Help on MemoryStream, BitmapImage
Can someone help me figure out what is wrong with this code: The code that is commented out throws an exception of ".. header corrupted". The portion that is not commented writes it out to file and then reads it. This code works fine. Thanks /* byte[] photoSource = Convert.FromBase64String(this.EmbeddedImage); bitmap = new BitmapImage(); MemoryStream strm = new MemoryStream(); strm.Write(photoSource, 0, photoSource.Length); bitmap.BeginInit(); bitmap.StreamSource = strm; bitmap.EndInit(); */ byte [] photoSource = Convert .FromBase64String( this .EmbeddedImage); FileStream fs = new FileStream ( @"c:\test" , FileMode .CreateNew, FileAccess .Write, FileShare .None); fs.Write(p ...Show All
Windows Forms Cannot get changes from DataGridView
I am having problems getting the changes from a datagridview. The grid is bound to a dataset. Here are the steps I'm taking: 1. Type text into the first cell 2. Click the save button on the form, which calls: Private Sub SaveChanges() Dim dsChanges As DataSet = dsFlightInfo.GetChanges() ' make sure their are changes to commit. If dsChanges IsNot Nothing Then ' save changes to the database Dim odb As New ABMS.Data.DataSetIO odb.Update(dsChanges, "FlightSchedDetail") odb = Nothing End If dsFlightInfo.AcceptChanges() ' reset the save buttons btnSave.Enabled = False btnCancel.Enabled = False End Sub PROBLEM: dsC ...Show All
Visual C++ Linking problem while building appln. developed in Visual studio 8 using visual studio6 version
hi all I tried building a DLL developed in Visual studio 8 (VC++) using Visual Studio 6.While building the DLL some header files say iphlpapi.h is missing.Is there any possibility to get Windows sdk for intel processor from internet or what is the solution for this Awaiting for responses... Regards Geetha iphlpapi.h should be in your \Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include folder (it is there in Visual C++ 2005 Professional Edition) ...Show All
SQL Server SQL 2000 Database upgrade to 2005
Dear All.. I have a few databases running a sql2000 and the time as come to move them onto sql2005. Which would be the best route to take. If I can think back to older version it was just a simply job of doing a backup in it's current version then restore in the new version and upgrade was taken while restoring.. I could be wrong but any help !! Thanks Martin. HI Hemantgiri Many thanks for the info, I knew my old memory was right - I shall remember your points when I upgrade thanks again Regards Martin ...Show All
Windows Forms How could I get the column's index of one column by the name of the column?
Hi, I am using VB.Net 2005. Could someone please teach me, how could I get the column's index of one column by the name of the column Say if I know the column's name is "dob", how can I know the column's index of this column by using the column's name Thanks a lot! Good Day! Best Regards, Boon. Hi ya, It depends which method you're writing it but here is the code: Private Sub DataGridView1_CellEndEdit( ByVal sender As Object , ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged If DataGridView1.Columns(e.ColumnIndex).Name = "amount" then ' write your code here .............. Hope this helps Thanks ...Show All
Software Development for Windows Vista July CTP breakpoint on state machine workflow can't open the workflow designer
Dear all, I am trying to debug a state machine workflow in the July CTP of WF. I have set a breakpoint on the state machine workflow, but when I debug and the breakpoint is hit, I get: Yes, I am. Since making some other changes to the workflow, the first breakpoint on the workflow is now successfully hit, and the designer appears correctly. I have no idea why this is. However, when I press F11 to step, the workflow claims to be running, and the breakpoint on the first state within it never gets hit. There appears to be something fundamentally wrong here, but I don't know what it is. I still get: ...Show All
SQL Server HELP!!! Can not restore database from only back up I have
I had to transfer my database from one server to another. Both are running SQL 2000. I backed the database up and moved it to the new server however when I try to do a restore I get the following message: The media set for database "xxx' has 2 family members but only 1 are provided. RESTORE DATABASE is terminating abnormally. I did some searching and found a couple of posts that mentioned something about the back up including 2 files. My problem is that the machine I backed this up from crashed when it was shut down and would not reboot so all of the data and the original database do not exist. Is there any hope of restoring this database. It is pretty critical. Thanks, Melissa :-) Tha ...Show All
Windows Forms What is the syntax for DataView Filtering using Child Column?
Hi. Given 2 related tables, parent and child, how would you write DataView Filter using child column. For example, if you have Customer and Order, and you want to find customers whom made orders in April-2006 - How to write a Filter for this I know that you can list the children and then go back to get the parents of each but it seams more natural to use Filter. Thanks for your help. Hi, I have defined a relationship in the dataset between the two tables and also have changed the 'Child' with a table name but still get a syntax error. I could not find an example anywhere for this - Strange! Regards. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Looking for Game Component Example
Is there a game component example anywhere I'm trying to build a font/text component and I'm getting nowhere fast. One just went up ont he XNA Team Blog, and the whole thing looks pretty cool! :D http://blogs.msdn.com/xna/archive/2006/08/31/734204.aspx ...Show All
Visual Studio 2008 (Pre-release) WCF for high troughput scenarios?
Hi, I was wondering if WCF is usable in scenarios where high throughput has to be achieved . For example a financial market data service that broadcasts market data via UDP (roughly 10k messages/sec). It's important that packets are as small as possible .. can this be achieved with WCF or is there always a high message size overhead Thanks, Tom I think that's not really what I was looking for. My question is targeted more on the message size and throughput efficiency. How much of an overhead in bytes does WPF add to messages in its most optimized way I need data broadcasted via UDP, reliablity is not really an issue, but it's a lot of data and minimizing the latency is essential. Thanks, Tom ...Show All
SQL Server SQL Native Client Configuration or Remote Connections problem
If I look under SQL native client configuration | Client protocols, I have no entries and no ability to look at the properties of SQL Native client Configuration. Something is missing which I think is related to an error when connecting to my local server. sqlcmd -E -S .\devmain, 1064 I get error : Encryption not support sqlcmd: Error: microsoft SQL native Client : Client unable to establish connection An error has occurred while establish a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.. In comparison to other machines here at work, it appears my remote connections are configured. But I have no ...Show All
.NET Development Using diffgram to update database
Hi there. Im trying to use a diffgram xml message to update the northwind database in sql server. the code im using executes but the changes are not updated. The code im using is from a text book. The code is supposed to change the contact name from Maria Anders to Maria in the customers table. I've added a reference to the SQLXML .NET assembly This is the xml fiile: diffgram.xml < xml version ="1.0" standalone ="yes" > < diffgr:diffgram xmlns : msdata ="urn:schemas-microsoft-com:xml-msdata" xmlns : diffgr = "urn:schemas-microsoft-com:xml-diffgram-v1"> < NewDataSet > < Customers diffgr : id =" Customers 1" msdata : rowOrder =&q ...Show All
Visual C# TextWriter vs. StreamWriter
I am using this operation to write a string variable response to a *.csv file. It runs into some problem: information gets lost about 50% of the time. using ( StreamWriter sw = new StreamWriter ( pathq ) ) { sw.Write ( response ); } I figured that this is perhaps due to the fact that this class is not thread safe. Another class TextWriter is offered as a substitute however when I change the code above into: using ( TextWriter sw = new TextWriter ( pathq ) ) { sw.Write ( response ); } I get an error: Error 1 Cannot create an instance of the abstract class or interface 'System.IO.TextWriter' D:\VCsharp_Projects\tapTCPports_1\Class2.cs 127 37 tapTCPports_1 Why I posted the same q ...Show All
Software Development for Windows Vista Vista with Samba
Vista will not connect to my Buffalo Samba NAS. Although the device appears in my workgroup, Vista continually asks for username and password then fails to connect. I have read this is something to do with "fast query" vs. "slow query". If this is the case is there any way to switch to "slow query" so that Samba drives will work Has anyone got a Samba drive working in Vista Hey guys. I'm having the same issue with Vista Business and Vgear Landisk. I have a brand spanking new system that I just built and now I am unable to access my NAS. I can login and view the first set of shares. I can then go inside one level deep but after that it doesn't let me go anywhere. Ther ...Show All
Visual Studio Team System How to delete unwanted Work Items and set new default items for new projects?
I created new Team Project and Wizard created a whole bunch of new Work Items which I don't need. I couldn' find a way to delete them from Team Explorer. Also - can I set a my own list of Tasks and Items for newly created Team Projects and how I can do it You can customize the process template to not create those workitems. See here http://msdn2.microsoft.com/en-us/library/ms194945.aspx for how to customize new & existing projects. Here is a tool to graphically manage templates http://www.gotdotnet.com/workspaces/workspace.aspx id=812a68af-5e74-48c6-9623-1a4469142a84 . Work Items in already created project cannot be deleted, but the project itself can be deleted and recreated. ...Show All
