BruceMeneghin's Q&A profile
SQL Server SQL Server 2005 - CONTAINS freetext over multiple fields
I'm a web developer using SQL Server 2000 for the majority of my client requirements, however one has come back with an issue that I cannot resolve, and would like to know if it's possible in 2005 before I spend time and money on an upgrade. The client wants to be able to search fields within a table based on text, phrases and boolean logic. This is not a problem. The problem comes from them wanting to search multiple fields at the same time using a statement that contains the text, phrases and boolean operators. Therefore I have 10 fields (for example) being searched for (('text1' or 'text2') and ('this is phrase1')) or 'this is phras ...Show All
.NET Development SQL Connection Problem
Hi, I have an ASP.NET 1.1 and MSSQL 2000 installation hosted with the same provider. Normally, I have no trouble connecting to the database, but roughly once per day, I get an exception train that starts with a 'General network error'. Mysteriously, this usually seems to happen at roughly the same time each day. My connection string and the code causing the exception are given below (values replaced by 'X'). I am sure you will agree, they are very simply; I am not trying to do anything clever. My question is fairly simple: is it normal to expect sporadic exceptions when trying to access an SQL DB in a live multi-user environment If this ...Show All
Windows Forms Application Running in a Partially Trusted Context
My aim is to learn how to allow client workstations to seamlessly reach a Windows Form data access application via an http:// invocation. I can do this when my box acts as both the web and database server. However, when the database (SQL Server) resides on a separate box (my box runs IIS 5.0), the client workstation can launches the Windows ...Show All
Windows Search Technologies Configure search locations programmatically
In our application, we want to exclude some by-default-checked locations (i.e., some special PST files listed in the profile), we also want to include some folders on the hard disk. This can be done through the WDS options dialog. But we need to do it at background, a.k.a., programmatically. Is this possible So far we found that following registries may be related: HKEY_CURRENT_USER\Software\Microsoft\RSSearch\Gather\RSApp\MyIndex\Sites\LocalHost\Paths HKEY_CURRENT_USER\Software\Microsoft\Windows Desktop Search\DS\Index\Rules But we are afraid that directly deal with registry may require restart WDS, and it may also mess up WD ...Show All
Visual Studio Team System Virtual User Number or Id
Is there a way to retrieve the id (or thread number) of the specific virtual users that is executing a unit test There is no built-in virtual user number that is accessible to the unit test running in a load test. However, since more than one person has asked about this now, you can add the following method to your unit test class which will return a virtual user id. The only caveats are that this won't really work as expected with more than one agent (each agent would have its own set of Ids), and it would not work if you have unit tests contained in different .dlls in the same load test. private s ...Show All
Visual Studio Team System Can't Query Work Items. Error TF26000
I'm in Visual Studio and either trying to do a checkin or just trying to run queries against work items I get the error TF26000: Could not connect to the Team Foundation Server. Check that you have a network connection and that your Team Foundation server is available. The server is available and I can connect, other things that require the server are working (for example I can check code in). Any help would be gratefully received! This happens when connection to the work item tracking database fails. Can you expand your project's "Work items" node in the team explorer ...Show All
Visual Studio Team System HTTP code 503: Service unavailable
We have TF B3 Refresh set up on a server and locally it seems to be working fine. However we have a team in Beijing that is having occasional errors like this: c:\Foo\Main\Src\Bitmaps\bar.bmp: Please contact your administrator. There was an error contacting the server. Technical information (for administrator): HTTP code 503: Service Unavailable Any ideas on how to troubleshoot this error Most likely it's an unhandled exception occurring on the application tier. You should find an error logged in the event log on the application tier (run eventvwr from a command prompt and sea ...Show All
Visual Studio Team System How to avoid Designer classes
How do we avoid throwing warnings for Designer class variables like resourceMan, resourceCulture, temp etc. And how to avoid system generated methods like .cctor etc For cctor's, check whether a Method is actually a StaticInitializer, eg: if (method is StaticInitializer) return null; To eliminate certain members, you need to examine the member.DeclaringType. The easiest thing to do is look at Member.DeclaringType.FullName and compare it to the type name you want to exclude. Don't forget to keep walking up the inheritance hierarchy (by examining the declaring type BaseType member) until it is non-null. We will probably prov ...Show All
SQL Server Raw File Source issue
I have a single file that contains records destined for multiple tables. The "first" record is considered primary and the other records are considered "secondary" (meaning that they have foreign keys to the primary table). In order to properly insert this I needed to use two data flows. The first data flow directed the primary rows to the primary table and the secondary rows get directed to a raw file destination. The second data flow read in from the raw file and wrote out the rows to the appropriate tables. But here is my problem. This darn validation! While I think validation is a great idea, the extensive use ...Show All
Visual FoxPro How do i disable an active screen saver?
Good day to everybody, i have a small program installed in the workstation that is controlled at the server, Can we disable a running screen saver when my program becomes active Example: I send a message to the workstation,... so my program installed there will pops-up automatically....but the problem is, ...when the user did not use the PC in a period of time so naturally screen saver will take-over, and my program pops-up at the background of the screen saver. is there a way to solve this Thank you and more power Not a good idea. Anything that is controlled by Windows should be kept to Windows. What ...Show All
.NET Development Error with ExecuteScalar()
Hi guys, this is the code: Dim StrRowCount As String Dim StrQuery As String Dim SqlConnString = ("data source=NUCX;initial catalog=Video Kiosk;User ID=sa;Password=[my password];") Dim custID = Me .CustomerID.Text Dim SqlConnection1 As New SqlConnection(SqlConnString) StrQuery = ("SELECT COUNT (CustID) FROM Customer WHERE CustID ='" & custID & "'") SqlConnection1.Open() Dim SelectCmd As New SqlCommand(StrQuery, SqlConnection1) StrRowCount = SelectCmd.ExecuteScalar() SqlConnection1.Close() SqlConnection1.Dispose() SelectCmd.Dispose() Dim IsCustomer As Boolean If ( CInt (StrRowCount) & ...Show All
Visual Studio Inheritance Restriction?
Hi all, I' am having some troubles. maybe somebody can help me out. When compiling my DSL I got the folowing error: Architecture.ServiceModel.Designer' already contains a definition for 'ServiceOperationHasRequestMessageAddRule This error is caused by the "ViewFixupRules.cs" file. I already tried to find a double definition in the model but cannot find it. Also there is NO double "ViewFixupRules.cs" file in the project. The problem is caused on a class that has an embedding relation. The class itself inherits from another class. an early picture of the model can be found on my blog (first picture of posting DSL 4)( http://www.edwardbakk ...Show All
.NET Development Downloading Files through the Web Browser Control
I have embedded the webBrowser control in my C# program. And I am navigating it to a page that I created where I try to invoke a download by setting my headers to this: header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=$transport_var3.xls"); print("$xlsheader\n$xlsdata"); Has anyone been successful in using Content-Disposition in IE 6.0 If so please let me know how. Any ideas Found the answer: I'd been trying to figure out why I couldn't get Internet Explorer to download a file if I used session_start(). It only happened with certain files. Here's the undocumented (I ...Show All
Visual Studio Tools for Office "Reload" listobject after UnList()
Hello, I'm trying to make an excel application where the user binds a dataset to a listObject. Then I'm doing a UnList() on the listObject so the data looks like an traditional spreadsheet. Then I whant the user to be able to bind another dataset to the listObject, but this can not be done after running UnList(). How can I instansiate a new listObject, or how can I solve this matter Best Regards Carl Hi Carl, When you call Unlist on a ListObject, the control does not exist anymore as it just got converted to a range. In this scenario, you need to use VSTO's ability to dyn ...Show All
Visual Studio Team System Missing Properties in TestContext
Inside a method marked ClassInitialize, I added a couple of custom properties in Properties dictionary of TestContext class (count shows 13 instead of defailt 11). My goal is to extract these custom properties in the test methods. Although the custom properties are available in the first test method (ConstructorTest), they disappear in subsequent test methods (TestContext properties collection shows count of 11 again, instead of 13). I am using Beta 3. Thanks in advance. There is a lot I would like to see happen with the test suite currently. There are a lot of ...Show All
