James Perry's Q&A profile
Visual C++ How to handle header and footer in a report?
Hi, I must first say that I only have a couple months experience in Visual C++. I've been reading a lots of books on the subject. Unfortunately, most of the time, the examples I could have on specific item was very "general" if I can say. With the other languages I'm using, I'm able to make reports with header and footer repeating on each page of report as well as an auto-incrementing page number, subheaders, subtotals/subfooters, etc. In all the documentation I have on hand, I unfortunately couldn't find any example of how to implement such report format. I would really appreciate if someone could give me examples or even ...Show All
SQL Server BCP Handling
Hi, I am executing script like this. How to check for the errors if "master..xp_cmdshell @bcpCommand" fails. Is there any way to verify that BCP is completed successfully DECLARE @FileName varchar(50), @bcpCommand varchar(2000) SET @FileName = 'E:\TestBCPOut.txt' SET @bcpCommand = 'bcp "SELECT * FROM pubs1..authors ORDER BY au_lname" queryout "' SET @bcpCommand = @bcpCommand + @FileName + '" -c -U -P' EXEC master..xp_cmdshell @bcpCommand Thanks in Advance, declare @ret int EXEC @ret=master..xp_cmdshell @bcpCommand ...Show All
Visual Basic Bug in ChangeType! 2005 Pre-release
The following code no longer compiles under VS 2005 pre-release (it worked in Beta 2): Microsoft.VisualBasic.CompilerServices.Conversions.ChangeType((int) 1, typeof(int )) Please advise. How should we convert to Nullable types at run-time Type someNullableType = .....; Microsoft.VisualBasic.CompilerServices.Conversions.ChangeType(value, someNullableType) Convert.ChangeType does not work with Nullable types. Thank You Chavdar Angelov Director, Lead Software Architect ...Show All
SQL Server Deploying reports on forms authenticated report server
I cannot deploy reports to my report server which is not customized to use our authentication. I also am unable to use SQL server management studio because even though I specify the right username/password, the custom authentication code looks for a cookie (custom cookie). Any ideas how to handle this issue ...Show All
SQL Server Getting sample databases in Management Studio
How to get sample database AdventureWorks and AdventureWorksDW deployed in Management Studio. I selected to install sample database entire feature on my local hard drive and I can see it did installed all the .mdf,.ldf,.dim,.cube and the rest in C:\Program Files\Microsoft SQL Server\90\Tools\Samples\ How can I get the database in Management studio. I tried to use Attach db and it didn't worked, gave me following error Msg 1813, Level 16, State 2, Line 1 Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. Msg 602, Level 21, State 50, Line 1 Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. ...Show All
Windows Forms Data Grid Performance in XP and 2000
Hi, I simply used datagrid (C Sharp) to connect mysql (odbcConnection). The project just display all records in the table that specified by the sql command (about 650 records). Also, the project was implemented using VS .NET 2003 under Windows XP Professional. I run the above project in Windows XP Professional and it takes about 30 se ...Show All
Visual Studio Express Editions CDate function returns 'IndexOutOfRange' error - also in VB.Net 2005 Beta2
Hi folks, I have already reported this error in the VS 2005 Beta2 forum, but was told that it was not reproducible (VbCity and VBug, and your UK Launch team were also unable to reproduce the problem). I think I now have a lead on the issue! It also looks similar to a problem reported yesterday on the VB Express forum - 'I keep getting the out of range exception'. I have condensed the problem to two lines of code: Dim myDate as DateTime myDate = CDate("01/01/2005") The above error is reported on execution of the second line. This has now occurred on 6 different ...Show All
SQL Server identifying procedures marked for autostart
Hi all, Is there a method of identifying all the procedures in a database that are marked for autostart i.e. select name from sysobjects where blah = 'autostart' Thanks, rocr Hi, use this one here: SELECT Routine_name FROM INFORMATION_SCHEMA.ROUTINES WHERE ObjectProperty ( object_id ( Routine_name ), 'ExecIsStartup' ) = 1 HTH, Jens Suessmeyer, --- http://www.sqlserver2005.de --- ...Show All
Visual C++ How to write an App with no console window at all
Hi I haven't written any C++ since VS6 so I'm rusty and please pardon me. I have a need for a very lean application which runs as a native mode executable with no accompanying libraries or manifest file. In other words this program behaves in the manner that a VS6 application would. I seem to recall that I could get a program to run without a console window by deassigning stdin and stdout but that may have been in a detached child process. Can anyone tell me how to do this If you create a windows program you don't get a console window to. There is no need to create your own window. Just use the wizard and create an Win3 ...Show All
Visual C# hooking other applications messages Challenge
Hi Hi i want to know when user changed the foreground Window .. So i want soemthing like a callback.. that will call me when windows is about to send a message to application that she now has focus.. Any ideea Any function to interop with or.. Please help guys! btw.. not threads allowed . You can use the GetForegroundWindow to get the handle of the window wich the user is currently working in. If you check this with an interval, you can react on changes. ...Show All
Visual Studio Team System Calling Declarative Tests
According to Rob Caron's blog ( http://blogs.msdn.com/robcaron/archive/2005/05/17/419001.aspx) it should be possible to call "declarative tests" from "coded tests." I can call another coded test but is it possible to call a declarative test Thanks Kevin, It is currently not possible to run a declarative test from within a coded test. Even running coded tests within coded tests is not fully supported in this release. Josh ...Show All
.NET Development Web Service and Application Security
My application software is deployed across two tiers; a WinForms workstation client and a Web Services layer. My application will require authentication, however I'm not keen on building my own authentication services into the application. Rather, I'd like to leverage Windows domain security. I can think of three scenarios: 1. The user is logged in to the domain. In this case, I'm assuming that the user's credentials will be used automatically when calling secured web services. 2. The user is not logged in to the internal network. When accessing the secured web service without credentials, will the user be automatically prompted for credenti ...Show All
Visual Studio Help still broken
Just installed the release version of VS2005 standard. Alas, F1 help is still broken. If I position the cursor over a word (for example HANDLE) and hit F1, the following happens: 1. If MSDN is set to use local help only, it always displays the topic-not-found page, even though on the left hand side, the topic is not only present, but selected. A single click on the highlighted item displays the correct information. 2. If MSDN is set to use online help first, then pressing F1 takes up to a minute (looks like multiple redirections happening), then either displays the topic-not-found page or displays something only vaguely related to the select ...Show All
Windows Search Technologies WDS as deployable MSI?
Hi! In our company we want to deploy WDS to some desktops through Active Directory. For this we need an MSI file, however, the installer which can be downloaded from microsoft.com is available only as exe file. Does anyone have any information about how to turn it into a deployable MSI file Or is there a pre-built MSI available for download somewhere Thanks --Michael Hi Michael, First, I’d like to stress that Microsoft doesn’t give any guarantees about a WDS installed from within an MSI wrapper not written by Microsoft. However, below are the steps that may help you create an MSI wrapper ...Show All
Windows Forms Designer keeps adding tablestyles in VS 2003.
Hi, I have a problem that is very annoying. I have a custom datagrid that extends the System.Windows.Forms.Datagrid, and are also using a custom Tablestyle that extends from the System.Windows.Forms.DatagridTableStyle. the tablestyle is created in the constructor of the custom datagrid. Everytime I open up the form that have the custom datagrid in Visual Studios designer, the Designer add a new tablestyle to the form and adds it to the Datagrid.Tablestyles.Addrange collection. So it doesnt take long before I have 10-15 tablestyles in that collection that are taking up space in the code, and I do not want any of them. Any ...Show All
