hunb's Q&A profile
Visual C++ printing on printer of integers in c++
hello as i am new to c++ , iwant to print two integers on c++ simply declare and initialize and print them on default printer only their values or address thanks waiting for reply don't think it ordinary question and leaving it without reply , it would be ordinary for u not for me. thanks ...Show All
Visual C# writing into *csv file: inconsistent result
string cur_drive = c2.const2 ( ); // this is just the current drive ("D:") string pathq = cur_drive + " \\VFP_Projects\\Data\\Stoxx\\ " + symbol + ".csv"; File.Delete ( pathq ); using ( StreamWriter sw = new StreamWriter ( pathq ) ) { sw.Write ( response ); sw.Close ( ); } response is a string variable that contains a whole *.csv file downloaded from Yahoo. The trouble is: I find the file (a) deleted, (b) created, and (c) the very first line filled in 100% of cases. The rest of the file appears EMPTY in about 50%. I have to look into the file and repeat the operation which is a great inconvenience. Is there a way to improve performance Why does it happen How can I get a feedback as to th ...Show All
Visual C++ messagebox
What's wrong with this MessageBox("Hallo. Dit is mijn eerste Visual C++ programma!"); 1>------ Build started: Project: Hello, Configuration: Debug Win32 ------ 1>Compiling... 1>HelloDlg.cpp 1>c:\documents and settings\ikke\mijn documenten\visual studio 2005\projects\hello\hello\hellodlg.cpp(166) : error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [3]' to 'LPCTSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>Build log was saved at "file://c:\Documents and Settings\ikke\Mijn documenten\Visual Studio 2005\Projects\Hello\Hell ...Show All
.NET Development soap response processing.......
Hi, I need to connect to a webservice and post soap request via http and should get response back and then need to process it, I am getting soap response back. now I need to process it and display in a grid, which would be the best way to process it, if I convert it to xml it would be easy for the dispaly, is anyway we can do it, pleaseeeeeeeeee advise. thanks Do you mind sending the VB 6.0 project to this address , so I have a look ...Show All
.NET Development BeginConnect/EndConnect + BeginReceive Exception
Hi There! I'm getting this strange behaviour when using async sockets with c# .Net 3.0 The problem goes like this: I start to connect to a tcp server with BeginConnect(), once the ConnectCallback is called, I finish the connection with EndConnect(). This then fires an event "OnConnected". A handler for OnConnected, receives the socket that I just performed EndConnect() on, and immediately starts BeginReceive() on it. Now the problem is that BeginReceive() throws me an exception: "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a send call) no address was supplied" But, EndConnect() finished without any exceptions So eh, what is the problem ...Show All
SQL Server Turning off validation
I need to turn off validation and I've seen some threads saying this is not possible but my situation has a twist. A customer needs the package to connect to different modem dialup connections to connect to different servers (they use dialup for security reasons). We have written two VB script tasks at the beginning and end of a loop, with data flows in between. Before the loop the dialup connection info is read into a recordset along with Data Source connection information. The first script uses this information to dialup and the last script hangs up the connection. The problem is the package tries to validate the data connections and the package has not dialed up yet, so it fails. We managed to confirm it works in a test environmen ...Show All
SQL Server Clicking on aggregations and displaying transactions?
Greetings SSAS Gurus, Please please help How would I set up my SSAS cube so that when the user clicks on an aggregate, that the transactions that comprise that aggregate, are displayed Also, how do I control what is displayed, both in terms of field labels (e.g. labeling the data "Account Balance" instead of "acct_bal_amt", and data values (e.g. seeing "$1,234.56" instead of "1234.56"). Any guidance would be appreciated, even if at a minimum, it consisted of advising me what the topic is called in SSAS so that I can (try:) ) and do the research myself In anticipation and appreciation email: gwithers at jhancock dot com Greg Withers In SSAS this concept ...Show All
Visual C++ Can SetTimer() (mfc) be used in real-time applications?
I'm developing a time-series data acquisition system that interfaces with DAQ hardware which reads and generates voltages through it's channels simultaneously. That means that Input (data acquisition) and output (generation) must be done with accurate timing. Unfortunately, the Generation process must be done using software timing (windows timing). So, i declared a SetTimer(TimerID, 1000, TimerProc) so that the callback kicks in at each second. At first, I encountered timing issues that the hardware timed data acquisition was lagging behind generation. I tried redoing that class but then again i tested it to be accurate (i actually used a stopwatch). It was only then that i found out the windows timer had elapsed 3612 seconds after exactly ...Show All
SQL Server migration from sql 2000 to sql 2005
Hi I am trying to migrate Databases from MS SQL 2000 (server A) to MS sql 2005 (server B). The problem i have when i use database copy wizard is that it gives an error and the login will not be migrated . I tried backup and restore of the databases as well as detach and attach.All cases the logins will have a problem. For example say for database intranet all the tables stored procedures etc gets migrated but under security >>users (say intrauser) i double click user and the the login name wont appear .and when i try to close the window it says login name must be specified(SQLmanagerUI) Please help. Anu_ooo - Your best best, what I've already done, is to do backups and restor ...Show All
.NET Development Timeout expired. the timeout expired prior to getting the connection from the pool.
Hi, I have developed a web application which works fine but sometimes the web applications hangs with the following message Timeout expired. the timeout expired prior to getting the connection from the pool. The application is developed in .net framework 1.1 and is running on IIS 6.0 . The database is oracle 9i. We are using Enterprise library application blocks for maintaining the database connections. So ideally connection leaks should not occur. This error occurs when a new user tries to log in to the application. I am not able to find any solution regarding this problem. Help regarding the same will be greatly appreciated. Thanks, Anzrul hi, It seems like program is not closing connect ...Show All
.NET Development Regarding Debug.writeline()
hi im using Debug.writline() method in my class.I don know where the writeline() method will write to..Can anyone help me in this issue WriteLine will write to the trace listeners in the Listeners collection. The default for this collection is to contain a DefaultTraceListener that will emit the information using OutputDebugString. If you are running your debugger this will appear in the output window. ...Show All
Windows Forms Input validation on Windows Forms
There are similar questions to this but answers so far have been spotty. So far this is my understanding of the built-in "validation routine" (yes, the quotes are there) for Windows Forms , at the 2.0 level of the Framework: Validation us set at the control level, ex. textbox.validating event There are no other validation controls (like the ones in ASP.NET) built into Windows Forms If your application has a single form, say only separted by a tab control for other functionality, you'll have to do some magic, or obtain 3rd party stuff, to get real validation going. Here's what I've experienced and why I don't think Windows Forms actually has a validation system at all - hence the quotes in "validation routine" ...Show All
SQL Server Beginner Question
I'm planning on implementing SSB with an upcoming project but it's crucial that SSB queue handle multiple requests sent by initiators. How does SSB ensure that the queue doesn't fail Also, what measures are put in place to ensure that the messages are retrievible if the queue does fail. Thanks Vince I'm not sure what would put the queue into a state where a message couldn't be received -- but yes, you could simply restore from a backup if you needed to. -- Adam Machanic Pro SQL Server 2005, available now http://www..apress.com/book/bookDisplay.html bID=457 -- < truongv@discussions.microsoft.com > wrote in message n ...Show All
Visual Studio 2008 (Pre-release) Do you plan some editable ListView (DataGrid) WPF control?
Do you plan some editable ListView (DataGrid) WPF control It is my understanding that the set of controls that will ship in v1 are complete in the current beta/ctp. There are control vendors working on such things, and you can get most of the way there with the existing controls. Look at the ATC Blog for some good examples on how to combine the current controls to produce a more complete data presentation result. For a full database editing experience you will need a third party control, or need to do some coding on your own. ...Show All
Visual C# how do u check if an entered time or date is valid
How do I do these pls 1- to check if a user enters the correct time for ex: 10:15 PM 2- if a user enters for example 3:5 i want to reformat that and display 03:05 instead 3- to check if a user enters a date correctly: 2007-12-26 Hi. One practical way to solve this kind of problems is by using Regular Expressions (Regex class in System.Text.RegularExpressions) private void btnCheckInput_Click(object sender, EventArgs e) { Regex reDate = new Regex(@"^(\d{4})(-\d{2}-\d{2})$"); Regex reTime = new Regex(@"^(\d{1,2})((:\d{1,2}) (PM))$"); if (reDate.IsMatch(txtDate.Text)) { MessageBox.Show("Date OK"); } else { MessageBox.Show("Date Error"); ...Show All
