CharlieChang's Q&A profile
Visual C++ Read text file to variable, write this variable to another file
Hello, I am new to Visual Studio and c++. I am using native., rather than managed c++ (I think and hope). I am able to read data from a file, but when I then try to turn around and write the string variable into a text file, the written-to file appears to be empty. Here is an excerpt of what I'm doing: std::ifstream fileInput; fileInput.open("SymbolList.txt",ios::in); std::ofstream fileOutput2; fileOutput2.open("SymbolsOut.txt",ios::out); std::getline(fileInput,line); std::cout << line << "\n"; start = &line[0]; j = strcspn (start,str2); std::cout << "j = "<< j << "\n"; length = line.copy(buffer,j,0); buffer[length]='\0'; std::cout << "buffer ...Show All
SQL Server system variable on execution status
All, Is there a system variable to indicate a package run successfully or failed I have a task in Event Handlers to log the process into a table, but I still need extra information like execution status, more likely, i f package successfully executed, I want to get a specific values from SQL server (like in DTS, execution_status = 4 when success), Any suggestions are welcome. Thanks in Advance Put the entire package inside a sequence with a precedence constraint to a script task or expression task that changes a boolean package variable with a default value of true to false if the sequence fails. Check the value of the variable to see if the package failed. Kirk H ...Show All
Visual Studio Express Editions XML DataSet
Hi Everyone, I have just finished watching a few videos that a friend sent me about VS.Net (not 2005) and I found them informative but I can't seem to get the final XML file into a DataSet. I have written a Schema and got that into my XML file (which is nice) but I now want to use one of the elements in a combobox and put the other info into two textbox's So my XML node have: < aaa > < aa > < value > a </ value > < meaning > meaning1 </ meaning > </ aa > < aa > < value > b </ value > < meaning > meaning2 </ meaning > </ aa > </ aaa > So in the video it said just select "Create DataSet" but I can't find i ...Show All
Visual Basic Not sure how to create this class design. Here is the Class1 code with a read only property. [AMENDED twice].
I was wondering what would be the syntax to achieve an end result of something like this: Dim MyClass as New Class1 With MyClass.User .Name = "Dude" .Email = "Dude@email.com" End With With MyClass.Employee .Name = "Whoever" .Email = "whoever@comp.com" End with I've tried classes within classes, structures within classes; but I keep getting all kinds of errors. This was my last try: Namespace CompanyInfo Public Class Class1 Public Class User Public Name as String Public Email as String Public Referred as String = "Paper" 'A default, doesn't need to be set End Class Public Class Employee Public Name as String Public Email as String ...Show All
.NET Development Error checking in compression xml document ?
Dear All, Previous time I have started a threaded which was regarding xml compression, its URL link is http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1125126&SiteID=1 , now i want to do error checking in that xml document. Kindly solve it. Thanks Uncompress it and it is yours. Do whatever you want including "error checking". ...Show All
Software Development for Windows Vista Send SCSI Command Fail in Vista
I have the following code sending SCSI rite command(0x2A) to USB Pen Drive in thw Vista. It can work well in the windows XP, but do not work in thw Vista. But DeviceIOControl return the fail and getlasterror is 5(Access is denied). Any one knows what , I am doing wrong void SendWriteCmd(void){ //// 1. Get Disk Drive Handle HANDLE hDevice = ::CreateFileA( AnsiString(" \\\\.\\F:").c_str () , GENERIC_READ | GENERIC_WRITE , FILE_SHARE_READ | FILE_SHARE_WRITE , NULL , OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL , NULL ); if(hDevice == INVALID_HANDLE_VALUE){ ShowMessage("CreateFile() Fail."); return; } //// 2. Initialize Data Structu ...Show All
SharePoint Products and Technologies Nested Master Pages Example
Has anyone gotten nested master pages working within MOSS I'm looking for a working example of parent & nested master page code. I've found little more than statements that they work just like ASP 2.0 master pages and this: http://msdn2.microsoft.com/en-us/library/ms476046.aspx There is says: For example, you can reference one master page from another master page using the following directive: <%@ Master master=MyParent.master %> Which isn't exactly right, because the tag needs to be "<%@ Master MasterPageFile ="~sitecollection/_catalogs/masterpage/parent.master" %> Is there a minimum set of other stuff that needs to be in a nested master page (similar to the minimum master page) to make it w ...Show All
SQL Server SQLBrowse problem
Hello everybody, we have encountered big problems with SQL 2005 SQLBrowser service. We made a mistake tinkering with settings for SQL Server 2005 Network Configuration trying to resolve some warnings in event log from SQLBrowser service. To made story short - this is cluster environment with multiple sql instances and sql services failed to start. Using clusterrecovery tool resolved that issue, but since then SQLBrowser service wouldn't start, for example running "sqlbrowser.exe -c" outputs: SQLBrowser: starting up in console mode SQLBrowser: starting up SSRP redirection service SQLBrowser is successfully listening on 0.0.0.0[1434] SQLBrowser: failed starting SSRP redirection services -- shutting down. All sql instances are r ...Show All
Connected Services Framework Could not find the CSF-Administration-OU Organizational Unit in Active Directory
I am trying to install CSF 3.0 on a machine joined to my domain. I choose Complete install, and leave the Optional Top Level OU box unchecked. I've also tried manually creating the CSF-Administration-OU in AD, but I get the same error. Am I supposed to have SSL Certs pre-installed before running CSF install This is from the MSI log: Property(C): SetCertificateList = SESSIONWEBSITECERTIFICATE,IDMWEBSITECERTIFICATE,PMWEBSITECERTIFICATE,PIWEBSITECERTIFICATE,SCWEBSITECERTIFICATE,NPWEBSITECERTIFICATE Property(C): DEBUG3a34 = 34 Property(C): DEBUG1a34 = 34 Property(C): SetSqlComboBoxSet = 1 Property(C): ORGDESC = CSFHOSTINGORGANIZATIONDESC Property(C): ERROR = No SSL Certificates in Certificate Store! Property(C): ERRORTRACE = &nbs ...Show All
Visual Studio Team System Customizing a sharepoint portal page
hi. i'm trying to working on SPS2007 [I hav very limited knowledge on SPS2003] Cud anyone help me out with the following doubts 1> Is it possible for me to remove the complete header portion, navigation bar from a page When I open a doc library of a site, I want only the document library workarea to be displayed on the screen. for this, am i supposed to play around with the masterpage if so, where is it located 2. i also want to use my own CSS file for formating. Is this possible I dont want to use the themes available. thanX! Sorry- this forum is dedicated to the administration of Team Foundation Server which is a component of Visual Studio Team System. While we do make use of Sharepoint as ...Show All
Visual Basic Image in DataGridView
Hello! I want to use images/pictures/icons (coming from the ressources) in a DataGridView in a separate field. The picture shown in this field will depend on a value of another field. Can anybody help me Seppe001, According to your problem, I suggest you to use the DataGridViewImageColumn.Image property that gets or sets the image displayed in the cells of this column when the cell's Value property is not set and the cell's ValueIsIcon property is set to false. The Image property specifies an image that is displayed in cells with no values when the column is not data-bound and the cell's ValueIsIcon property is set to false. For a data-bound column whose cells do not have an associated ima ...Show All
Visual Studio Express Editions Ending Application
How do you end application properly when the user click on the X on the control box I have a program that does a loop, reading delimited file. What happens is that when user closes the program, it's still running in the background. I used "End" on form closed, and it works great; but I've read that you should never use it. So what is my alternative to stop it The simplest thing to do is to set the shutdown mode to "When Startup form Closes" ...this will force the application to end when the startup form is closed no matter if any other forms are open. Otherwise you can use: Application .Exit() ...Show All
Visual Basic Welcome to the Visual Basic IDE forum!
Hi all, and welcome to the Visual Basic IDE forum . I'm Paul Yuknewicz - I'm one of the Program Managers on the Visual Basic product team, and starting today, I'll be moderating these forums. For more info about me, check out my blog . Note there is a VB Team blog as well. In this forum we will cover questions and discussions regarding the all things in the Visual Basic IDE (integrated development environment). This covers Intellisense, debugging, ErrorCorrect, ClickOnce deployment, code snippets, colorization, smart tags, key bindings, Object Browser, Refactor! for Visual Basic 2005 , etc. The team and I look forward to joining you in discussions about VB. Best, Paul ...Show All
Game Technologies: DirectX, XNA, XACT, etc. A Few Questions
I've been programming for a while, but I can't grasp a few basic concepts of game development, so I have a few questions (actually a lot of questions, but i'll only ask a few) I see a lot of documentation talking about 3D stuff, but I'm interested in 2D and it's hard for me to relate 3D tutorials to 2D. What exactly is the SpriteBatch class, and how should it be used Would I derive an "enemy" class from SpriteBatch I don't understand the way a "camera" works.. if you move a camera, is the actual camera moving or are all the sprites moving Do I have to move them manually OK, here's some code from the Help file I told you about: partial class Game1 : Microsoft.Xna.Fram ...Show All
SQL Server High Availability and Scalability ...
We have a multi-lingual website (English, Spanish and German). We have a table called Posts that is potentially getting really big. We are in the initial design phase of the database and would like to know what the experts are suggesting to keep our database mean and lean in the long run. We have been talking about splitting the database up into 3 separate databases, one for English, one for Spanish and one for German. The language specific databases would also be hosted in countries where the language is spoken eg. the German database would be hosted in Germany. Or maybe database partitioning by language Making changes to 3 databases once launched seems like a nightmare. It would be nice to have one main ...Show All
