favio's Q&A profile
SQL Server Where to use SQLCLR ? Data access is not recommended?
Just wondering which scenarios is suitable to use SQLCLR. Any kind of data access is not recommended I guess. Only things that cannot be easily done in TSQL should be done in SQLCLR but why Can't those things be done in app layer itself Scenarios recommended for SQL CLR: - External data access like filesystem, registry etc - Complex calculation - Recursion without data access (this can be implemented with CTE for data access) If data access with SQL CLR is not recommended why should CLR should be even used and logic reside in database layer.. it makes no sense to me. Any thoughts Thank you for the eye-opening response. Using sp_executesql will use the indexes and the query plan will be saved - agreed. B ...Show All
Visual C# Network inteface activity loger
I would like to write a simple network activity monitor, to count sent/received bytes by my computer, but I can't find any solution. Is any easy way to solve that problem YES! private void GetNetworkInfo() { NetworkInterface [] interfaces = NetworkInterface .GetAllNetworkInterfaces(); if ( NetworkInterface .GetIsNetworkAvailable()) { foreach ( NetworkInterface iface in interfaces) { if (iface.OperationalStatus == OperationalStatus .Up && iface.NetworkInterfaceType != NetworkInterfaceType .Loopback) { IPv4InterfaceStatistics stats = iface.GetIPv4Statistics(); label1.Text = stats.BytesSent.ToString(); label2.Text = stats.BytesReceived.ToString(); } } } } ...Show All
Visual Studio 2008 (Pre-release) Generic exception handling strategy
Hi, What is the recommended approach for exception handling on the WCF tier The SDK and some of the threads on this forum are stating that separate data contracts should be created to represent the various SOAP faults. Then, I am supposed to mark up the OperationContract methods with the "expected" faults (by the way, the documentation says that I can mark a service contract itself with a list of expected faults, but the compiler is claiming that it's only available for methods -- is the documentation out of date ). Then, in my service operation, I am supposed to wrap my calls (to business logic layer, let's say) in a try/catch block and provide mapping between specific exceptions and SOAP faults in the relevant "catch&qu ...Show All
Visual Studio Team System Add Related Work Item fields question
We are using the "Add Related Work Item" feature for creating a Bug from a Test. This is being done by right-clicking on the Test work item and selectiong the "Add Related Work Item" option. What we want to do is specify how field data gets copied from the Test WIT to the Bug WIT. It looks like a few of the built-in fields get copied automatically (maybe by reference name ). But I would like to customize this behavior. For example, we would like the Title of the Test WIT to flow to a custom field in the Bug WIT - instead of the Title field. And, we also want other custom fields from the Test WIT to flow to other fields in the Bug WIT. Is there any way to accomplish this I messed around with the WIT elements and attributes in ...Show All
SQL Server Database Attache Problems
When I attempt to attache an existing SQL Database in SQLExpress, I get sent to the attach databases dialog. I click on the add button and get an abend with the following message. Locate Database Files - server\SQLEXPRESS dialog box. c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data Cannot access the specified path or file on the server. Verify that you have the necessary security privledges and that the path or file exists. If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Location dialog box. When I click on OK, the Location Database Files dialog box opens, pointing me to my cd drive and does not permit me to alter the drive letter. Since the databas ...Show All
Visual Studio Team System Difference between stakeholders and constituents?
Stakeholders and constituents sound like the same group of people. What's the difference between them Are they interchangeable For example, an end user is a stakeholder to a project, can I say he is also a constituent for that project Thanks in advance. Hopefully what is a "constituent" was sufficiently covered in the thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=936639&SiteID=1 A "stakeholder", as defined on page 60 of the MSF Essentials book , is "anyone with a vested interest in the effort...". Therefore, comparing the two: a constituent is someone (or something) being advocated (often indirect influence over project requirements) whereas ...Show All
Visual Studio Same problem - error reading file during install of MS Visual Studio Trial
I downloaded the file from the site, and burned it to a DVD. I then ran the DVD and got the message that there was an error reading the file WindowsInstaller-KB893803-v2-x86. Thinking this was a bad DVD, I burned another copy and ran it. Same problem. I'm thinking there is a problem with the img file that MS is putting out. have you tried burning the DVD on a lower speed as well as this, have you read and tried the steps on burning/mounting the DVD image: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=778624&SiteID=1 ...Show All
Visual Studio Tools for Office How to I saved a email item and put it into a task item?
Hi, I want to ask is there a way for me to save a email item and put it into a task item. For example, there is a icon of a email item in the body of a task item, when I click on the email icon, I'm able to open the email. Thanks... Take a look at the MailItem.Attachments.Add method: Function Add(Source, [Type], [Position], [DisplayName]) As Attachment For the Type parameter, you'll use Outlook.OlAttachmentType.olEmbeddeditem to put a copy of the message into the task body. ...Show All
Windows Forms Tooltip
I am using the following code to dynamically create buttons and set a tooltip. But the tooltip does not appear. Any idea what's wrong I am using .NET 1.1. Button b = new Button(); b.Text = sButtonText; b.Resize += new System.EventHandler( this .button_Resize); b.Tag = tag; b.Click += new EventHandler(button_Click); b.Parent = panel1; ToolTip t = new System.Windows.Forms.ToolTip( this .components); t.ShowAlways = true ; t.AutoPopDelay = 5000; t.InitialDelay = 1000; t.ReshowDelay = 500; t.SetToolTip(b, "APPLE"); Thanks in advance. Once the function exits, there is no reference left to the tooltip. The garbage collector is going to d ...Show All
SQL Server Create Time dimension Year, Week, day problem
Hi, I have a problem when creation a Time dimension Year, Week, day , The week does not start on the correct date eg. Week 42-2006 should start on 16 th. october and end on 22 th october, but in this case it starts on the 15th october and ends on the 21 october. So what happens is that it starts 1 day before it actually should. This is my Time Dimension: DatePart(year,"dbo"."fCapacityLedgerEntry"."Posting Date") DatePart(week,"dbo"."fCapacityLedgerEntry"."Posting Date") 'Week ' + convert(CHAR, DateName(week, "dbo"."fCapacityLedgerEntry"."Posting Date")) convert(CHAR,"dbo"."fCapacityLedgerEntry"."Posting Date&quo ...Show All
Visual C# how can i delay compiler??
In order to see the changes I want to add delay time. That is actually the "timeFly()" method's work. But this is not suitable and reduces the performance. Can I use Timer class for this aim If yes, How can i write code statement private void timeFly() { for ( int i = 0; i < 12000000; i++) { } } private void fly() { int t = 0; timeFly(); timeFly(); while (t < 50) { this .pictureBox36.Image = Properties. Resources .fly1; timeFly(); this .pictureBox36.Image = Properties. Resources .fly2; timeFly(); this .pictureBox36.Image = Properties. Resources .fly3; ++t; this .pictureBox36.Location = new Point (a, b); a -= 5; b -= 2; } ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Reading texture from a stream
Hi, im trying to find out if there is a way to read a texture from a stream, im reading from a large file which holds loads of texture files (DXT1 and DXT3 mainly), all the information about the texture is given and then you are given the texture data. So far i have been reading the data using a binary reader and unpacking the colors into A8R8G8B8 format to use when rendering. My question is since i know all the texture info is it possible to read the texture and use it in it's original format without the overhead of converting Thanks for any help. Have you tried TextureLoader.FromStream It should work as long as your textures use one of the supported formats. For DXTx DDS would be ...Show All
Visual Studio Express Editions Finding row by value using string expression
I seem to have a problem with replacing a value in the select like statement instead of using 'A%" I want to have a string to do the select with strfindcust This returns a error Cannot find column [strfindcust] I am using vb express It is probably very simple - i've just been away from programing quite a while Private Sub btnCustLookup_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCustLookup.Click Dim strfindcust As String Dim foundrows() As Data.DataRow strfindcust = InputBox( "Enter customer name: " ) foundrows = Me .DsCustomerDataSet11.Tables( "customer" ) _ .Select( "Name like strfindcust" ) End Sub ...Show All
Visual Basic Getting Line no. & Column no. of the current cursor position in the Rich text box
For the project of COMPILER, write now if someone can tell if we can get the Line no. & col no. of a char in a richtextbox, (multiline ofcourse) i m accessing the chars (for parsing) like as follows [ Code: 1]rtf1.text.chars(dex) i need to tell what line & col does the user's cursor is, how m i gonna do it i don't know, i tried to get help with the intellisense, but won't find it anywhere in short, I want to know the LINE NO. & COL NO (as it apopears n VB.net in CODE view) of the Rich Text Box the user is writing code in maqk wrote: I CHANGED IT WITH THE FOLLOWING Return (Position - y - 1) 'i changed the code here, UR CODE WAS -> Return (Position - y + 2) I STUDIED IT, UNDERSTO ...Show All
SQL Server Team development issue when debugging applications
Hi, At the moment I am working on an asp.net 2.0 application where we use sql server 2005 as database server. We are building this web application with 5 developers in paralel and we noticed that when one developer is debugging the application (hanging in a breakpoint), other developers get a sql time-out exception. Yes we are using Transactions (System.Transactions namespace) but we have totally no idea why this side-effect is occuring. Any suggestions or tip is more than welcome ! Grtz Okay, we know this is an option, but this also creates a massive overhead to merge those databases in the end. But we are considering this. We just are interested to know what lies on the base of this problem. Our TransactionLevel is s ...Show All
