Mart Tapp's Q&A profile
Visual C# Classes with the same name in the same namespace....
Hi All, In my solution I have 2 classes with the same name in the same namespace. This was legal in VS.net 2003 (.Net 1.1) and all the compiler did was to raise warning about this problem. However with VS.net 2005 (.Net 2.0), this has changed it now throws a compiler error for the same. Is it possible to get around this issue in any way without having to change the class names... Thanks in Advance andypai This code compiles. The compiler picks up the defintion from the first reference in its refernce list that matches... I agree it is bad coding practice but I have inherited this piece of code from the previous team and I dont want to make changes unless I really have to :-) So, the functioning of your appliation d ...Show All
SQL Server Can I use else if... like this?
hi, In SQL Server, does it have this: if... else if ... else if.... else.... It seems I have to do it like this: if.. else... begin if .... else begin if...... end end i think you can do it this one works well USE pubs IF (SELECT AVG(price) FROM titles WHERE type = 'mod_cook') < $15 BEGIN PRINT 'The following titles are excellent mod_cook books:' PRINT ' ' SELECT SUBSTRING(title, 1, 35) AS Title FROM titles WHERE type = 'mod_cook' END ELSE IF (SELECT AVG(price) FROM titles WHERE type = 'mod_cook') > $15 BEGIN PRINT 'The following titles are expensive mod_cook books:' PRINT ' ' SELECT SUBSTRING(title, 1, 35) AS Title FROM titles WHERE type = 'mod_cook' END ELSE IF ...Show All
SQL Server Report Model: Drill on calculated field in Report Builder
Hi, I've created dsv that contain all fields from table database. in the smdl I've remove some fileds due to security. All fields in the smdl do not contain drill. Issue: When I created calculated field in the report builder the field has a link. When I clicked the drill I saw all the record data including field that not in the smdl. Questions: 1) Can I remove the link from the calculated fields 2) Can I prevent from users drill to fields that not in the smdl Thanks, Assaf 1) You cannot remove the Clickthrough links using Report Builder. You can manually remove them by editing the report in Visual Studio. However, you may not be able to load the report back into Report Builder after m ...Show All
Windows Forms maximise mdi child form
VS 2005 this is my code: frm.MdiParent = this ; frm.WindowState = FormWindowState .Maximized; frm.Show(); but mdi child is not maximized. form border is set to non. Did someone new answer There is no reason why this should not work. So there is some other reason for that. Posible there is other code that is executed after showing the form, posible in form load that sets the form to other state then Maximized. ...Show All
Visual C# help with the following code
I'm new to .net and just learning c#. I have the following code in vb and want to convert this to c# Public Class PositionData Private strText As String Private strUrl As String Public Sub New(ByVal strDisplayText As String, ByVal strURL As String) Me.strText = strDisplayText Me.strUrl = strURL End Sub Public ReadOnly Property DisplayText() As String Get Return strText End Get End Property Public ReadOnly Property URL() As String Get Return strUrl End Get End Property End Class Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim MenuItems As New ArrayList MenuItems.Add(New PositionData("About Us", "About.aspx")) Men ...Show All
Visual Studio Express Editions Tried Everything, apart from what's needed.
I want the picturebox (pbCrop) to show and be the same size as the selected image, I've tried everything I can think of but none of the solutions that I come up with work. The code is below, at the moment pbCrop is the same size as pbResize and is blank apart from the selected area. I did manage to get pbCrop to the same size as the selected area but the selected area was out of site. Dim b As New Bitmap(pbResize.Width, pbResize.Height) Dim g As Graphics = Graphics.FromImage(b) Dim z As New System.Drawing.Drawing2D.GraphicsPath If radEllipse.Checked = True Then z.AddEllipse(cropX, cropY, cropWidth, cropHeight) g.SetClip(z) Else z.AddRectangle( New Rectangle(cr ...Show All
Visual Studio Express Editions Book suggestion??
What if you could only suggest one good book to a beginner Please don't make my mind mud with three books in one post. Just one book, please. Would anybody care to suggest a good book to a guy who doesn't know a thing about VB Generally you can get some good information out of the Dummies series of books, for some one who is just starting or is looking for a reference book to remind you of a function you can not go wrong with these. In this series there are some good ones for the express products as well as language specific titles. ...Show All
SQL Server Grouping with Page Break
I have a report that shows the monthwise details, i have performed this using the table control. the requirement was to have a page break after each month detail. End of each group display the monthwise total. This is absolutely working fine. My problem is, I am suppose to display the Report total also. I used the Sum in the Table footer. The sum is coming fine the only problem that i have is it is printing on the a New Page instead of the Last Page. Please suggest. I have to display the Report Sub Total of the Group that i am already doing in the Group Footer, Where as I am wanting to display the Main Total of the Report, It wont work in the Group Footer as it is the Full Report total. I tried to add a new Group fo the repo ...Show All
Visual Studio Team System FxCopCmd.exe returned error code 8.
I have no idea why i am getting this error.. may be you can help me ..also my application is unable to load the dll from app_code directory within the web service directory. 1.Error 1 CA0055 : Could not load CustomSecurity.dll. http://localhost/SecureService/ 2.Error 9 FxCopCmd.exe returned error code 8. Please reply asap.. thanks for your time.. Have you written a custom rule I don't recognize the rule ID you provided (although it conforms to the MS standard). Our analysis checks start at CA1000. The CA0000 block is reserved for internal errors and we haven't allocated CA0055 yet. ...Show All
Audio and Video Development i have problem with video files
ok so lets start. When I load .avi video file, the player doesnt play it correctly. Colors are very dark and u cant see anything. I have installed K-Lite Codec Pack. Can someone help me with this problem You should go ask in K-Lite codec community, Direct Show related stuff, or other generic Windows multimedia environment. This forum is about "Media Foundation" which appears in Windows Vista, not XP. ...Show All
SQL Server .Net DataProvider for SAP Timeout
I am using the .Net DataProvider for SAP. When importing data I receive an error, when calling sap functions via exec. The errors vary (e.g. Error 0xc0047062: Data Flow Task: Microsoft.Adapter.SAP.SAPManagedProviderException: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.) On the sap-side the function runs, but it takes a few minutes. I can ask the sap-bw team to speed up their performance, but this is political. The sql-timeout parameter is not working with this datareader. Have you any proposal that solves the problem. Thanks This has no effect. On my opion none of the properties has any effect. But thanks for your answer. ...Show All
SQL Server Connection string Problem
Hi! I have a very silly problem here. i am setting some variables here from c# code. Everything works fine except for Conn string. I understand statements that works fine in SQL does not act same in C# because of string literals. I need an extra qoute \"" ......."/" that would execute in C# \"" Data Source=SE413695\AASQL2005;Initial Catalog=TestDB;Integrated Security=SSPI ;"\" where as in c# setting variable value as : string scriptTaskConnectST = @"Data Source=SE413695\AASQL2005;Initial Catalog=TestDB;Integrated Security=SSPI;"; executing this through c# code jobCommand = new SqlCommand("xp_cmdshell 'dtexec /f \"" + path + "\" /Set ...Show All
Visual Studio 2008 (Pre-release) not getting an expected XBAP SecurityException
i'm developing a partial trust XBAP application. it calls a 3rd party SOAP web service (e.g. http://somewebservice/...), so i added the -DebugSecurityZoneURL flag. -DebugSecurityZoneURL "http://somewebservice/" ... and that works but then it's also calling an XML-RPC webservice to get images, and that is at some ip (http://205.###.###.###) to populate a BitmapImage with a Uri. i expected that call to fail, because that ip does not match the -DebugSecurityZoneURL ... but it works! http://somewebservice/ is a different ip address than the other ip address. so how is this working when i debug with partial trust will this break when i actually deploy this Thanks, casey ...Show All
Community Chat Free Lists - Just a Q & D app I needed.
http://www.barrysumpter.com Free Lists is the only app there written in vb.net. Don't worry about the other products. I've only sold 1 of each. I have no fantasies or pretentions regarding sales. Best intentions to offer Free Lists as a usable product developed in my spare time over a three day period. Standard, evironments, interfaces change so often I've given up trying to conform. For me, vb.net has been an absolute nightmare. Any features left out are from frustration only. Any positive comments are welcome. Any positive constructive suggestions may very well end up in the next version. All the best to everyone. I've just asked my ISP for assistance on this matter as well. As always, I'll post everyt ...Show All
SQL Server Calculated Members
I have a reporting services report that I'm creating from an Analysis Services cube. I created two calculated memebers. When I put either one of the calculated members in the report and try to render the query or generate the report, I get an error: Memory Error: Allocation Failure: Not enough storage is avaliable to process this command. I have 21 GB of hard drive space. I do only have 1 GB or RAM, put I thin that should be enought. Any ideas as to why I get this problem when I run the report including a calculated member BTW, the report works okay (not great in regards to timing) when I don't include the calculated memebers. Thanks, When i Run the MDX Expression direcly against the cube wit ...Show All
