Ray Brack's Q&A profile
.NET Development Access to SQL Database via TCP/IP
Hello, I developed a sql database application. The application runs well on my local machine. Now that the application is tested I want to set up a client computer and access my sql database which is stored on my development machine. I just don't know how I can modify the connection string in order to access from my client computer Current connection string: Data Source=.\SQLEXPRESS;AttachDbFilename="C:\WC Database\WcDatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True Can anybody help me and tell me how I change my application from local access to access via network (TCP/IP). Thank's After enabling the TCP/IP try the following command on the ...Show All
Silverlight (formerly WPF/E) Getting the id of the hosting WPF/E control
Hi, The new CTP contains the GetHost method but how can I get the id of the hosting control Lets say I have 2 WPF/E controls on the same HTML implementing the same click event. I need to identify which control was clicked. Thanks, Keren Personally, I couldnt' figure it out. However, I think I figured out a viable workaround. The workaround is as follows: I used the "SourceElement" property of the WPF/E Control to store the id of the hosting control. This approach is probably not optimal, however, because the SourceString and Source property values take precedence in loading XAML content, the approach has worked fine for me. In addition, the "SourceElement" property is just a string and it doe ...Show All
Internet Explorer Development How to determine the version of IE
I have been writing a BHO. How can I determine which version of IE is hosting the control http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=929174&SiteID=1 ...Show All
Smart Device Development Load Background image into ListView Control, but ListViewItems don't display...
Hi all, I wanted to put a background image on a ListView Control, but found that when you extend on the ListView Control the OnPaint() method cannot be overridden because the CF doesn’t not call OnPaint() on the ListView. It is called lower down in the OS. Anyway, I have managed to use a class that catches Windows Messages (WM_Paint) on the ListView Control and then calls a method in my ListViewExtender class (this is through a delegate). Now I can get the ListView to display the background image perfectly. But the ListViewItems that I add to the ListViewExtender instance do not get displayed. Is this because I have used the DrawImage() method which draws the images on top of the ListView items Or is it a case that I must also re-draw the ...Show All
Visual Basic How do I make a new thread?
How do I make a subroutine (LoadIntro()) execute on another thread here is an example and more information: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemthreading.asp so in your case.... public Shared Sub MyMethod() 'Do some work End Sub public Shared Sub Main() 'Or some other method where you wish to create and run a thread Dim theThread as new Thread(AddressOf MyMethod) theThread.Start() end sub does this help ...Show All
Visual Studio 2008 (Pre-release) Svcutil - July CTP - Metadata contains a reference that cannot be resolved
Hi, I just wanted to try some sample code and generate the proxy with svcutil. The service is self hosted and I'm running into: C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin>SvcUtil.exe http://localhost:80 01/Weather/out:proxy.cs Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4312.0] Copyright (c) Microsoft Corporation. All rights reserved. Attempting to download metadata from 'http://localhost:8001/Weather/out:proxy.cs ' using WS-Metadata Exchange or DISCO. Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4312.0] Copyright (c) Microsoft Corporation. All rights reserved. Error: Cannot obtain Metadata from http://local ...Show All
Visual Studio 2008 (Pre-release) Triggers!
Hello everyone, I am trying to create a trigger that is true to have it change a property value of a different element. Here is an example <Page xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006 "> <StackPanel> <StackPanel.Resources> <Style x:Key="MyStyle " TargetType="{x:Type ComboBoxItem}"> <Style.Triggers> <Trigger Property="ComboBoxItem.IsSelected" Value="True"> <Setter TargetName="txtMyTextBox ...Show All
Visual Studio Team System Missing merge options on first merge
Getting some strange behaviour from merge/resolve here... 1 main dev track $/XXXTestA/Dev 1 branch created from a subset of Dev $/XXXTestA/5.30.xx Check out 1 file on Dev, make a change, check out same file on branch, make a change in the same area. Open up a VS2005 command prompt and run the following command: (In a workspace where both Dev and 5.30.xx is mapped) tf merge /noprompt /recursive /version:C412~C412 $/xxxtesta/dev $/xxxtesta/5.30.xx Where 412 is the changeset created by the checkin on Dev This gives me a merge conflict (as expected). Now I do tf resolve to fix the conflict, but when the resolve window comes up, the "merge changes in merge tool" option is disabled, why The only available o ...Show All
.NET Development LinkList or List, which is faster?
I thought LinkedList would be faster than List but I ran a test and it showed they were about the same speed. Anyone else done a test like this It doesn't make sense that List would be as fast and LinkedList. My test was reading in a 300 meg data file (row, column), and then writing to the data. You need to take into account orders and access patterns. Here, P is the index position, N is the number of items in the list, and C is the capacity of the list. For a linked list appending to the end is O(1), inserting at the beginning is O(1) and inserting at an arbitrary location is O(1) if you already have a reference to the node next to where it will be inserted or O(P) otherwise. Retrieving items f ...Show All
Visual C# What is the purpose of a private constructor?
What is the purpose of a private constructor For which purpose we use it i think to Prevent the creation of instance for a class use the private constructor, but can any body explain it in better way Good Explanation. But Private class are specially used to prevent instance of a class publuc sealed class MySingleton { static MySingleton instance = null; private MySingleton() { } public static MySingletopn ClassInstance { get if(instance == null) { instance = new MySingletion(); } return instance; } } ...Show All
Visual Basic convert into .NET 'Any' datatype from vb6 to char *szFilename in C++
Moving vb6/C++ into .NET 2.0 and using upgrade wizard as place to start. What do I do with this 'ByVal szFilename As Any' to 'char *szFilename' conversion in .NET I will be wanting to leave the c++ dll as is. It's the 'Any' datatype I am puzzling over. What do I change that to Thanks. -greg ********vb6 interface code**************** Public Declare Function foo _ Lib "foo.dll" _ (ByVal szFilename As Any) As Long ******** C++ dll **************** int EXPORTED foo(char *szFilename); You need to do: Public Declare Function foo Lib "foo.dll"(<MarshalAs(UnmanagedType.LPStr)> ByVal szFilename as String) As Integer Hope this helps, ...Show All
SQL Server creating a user stored proc
I'm running mssql 2005. And any stored procedure I create in the master database gets created as system procedures since recently. I have created procs in the master database as user procs previously. As sp_MS_upd_sysobj_category is not supported in mssql 2005, does anyone know why this is happening.. or how I can rectify it Thanks I don't actually want to create system procs.. I want to create this proc in the master database and do not want it to be a system proc.. just a normal user proc.. I was able to do so since recently..But I think some thing has gone wrong and now when ever I create a proc, it gets created as a system proc... I did run the sp_MS_upd_sysobj_category with 2 but I understand that it's obsolete now...Any idea ...Show All
Software Development for Windows Vista Starting a WF from a WF
Hi, I'm trying to create a custom listener activity that starts other workflows and running into problems getting a handle on the WF Runtime. We are calling this particular activity from an ASP.NET site. On my local machine it works fine when I do this: WorkflowRuntime wfRuntime = new WorkflowRuntime("WorkflowRuntime"); wfRuntime.StartRuntime(); Dictionary < string , object > parameters = new Dictionary < string , object >(); parameters.Add( "TaskId" , taskId ); WorkflowInstance wfTask = wfRuntime.CreateWorkflow( typeof ( j1pTask ), parameters); wfTask.Start(); But when we publish the site to the server we get errors on the first line. From my reading it appears that this shouldn't w ...Show All
Visual Studio 2008 (Pre-release) Performance Anomaly: XamlReader.Load vs XamlWriter.Save
I've run across a curious performance anomaly when saving and loading WPF objects using XamlReader and XamlWriter. Specifically, loading an object with XamlReader is at least six(6) times faster than serializing the same object with XamlWriter. I've tested with a simple Pen, an EllipseGeometry, a GeometryDrawing, and lastly a DrawingGroup. The results: Pen - XamlWriter.Save is ~9X slower than XamlReader.Load EllipseGeometry - XamlWriter.Save is ~8X slower than XamlReader.Load GeometryDrawing - XamlWriter.Save is ~7X slower than XamlReader.Load DrawingGroup - XamlWriter.Save is ~13X slower than XamlReader.Load. Now I can understand *some* discrepancy, but this much Since the Xaml Parser is a pillar of WPF, is this a ...Show All
SQL Server Force Package Completion?
Is there a way (during the Control Flow) to force a package to complete successfully when a specific condition is met Here is what I'm trying to do: A package will be scheduled to execute once a day The first thing it does is downloads Excel files from an FTP site. If there are no files to download, I don't want the package to fail, I simply want the package to stop (preventing the subsequent Data Flow tasks from executing), returning a successful completion. The reason, I need a successful completion is because I plan to have MOM monitor the Windows event logs, notifying us of any errors that this package logs. Brian.Nelson wrote: Is there a way (during the Control Flow) to fo ...Show All
