View Complete Post
I have a class that inherits from FrameworkElement and has a mixture of DPs that I've added and the ones inherited e.g. WidthProperty, HeightProperty etc...
I have a UserControl that inherits from my class and has various textboxes in a popup resource like this
<TextBox Text="{Binding Path=Width, UpdateSourceTrigger=Explicit}" />
I've added a click button so that when the user changes one of the textboxes (in the popup), a routedUIcommand will fire (see below).
public static void OkCommand_Executed(object sender, RoutedEventArgs e) { MyClass c = (MyClass)sender; //this seems to work fine because it is implicitly declared in my class BindingExpression be = s.GetBindingExpression(MyClass.MyPropertyProperty); if (be != null) be.UpdateSource(); //this does not work because the DP is inherited from FrameworkElement. It is returning null. BindingExpression be = s.GetBindingExpression(MyClass.WidthProperty); if (be !=
Due to restrictions on implicit column alias usage in SQL queries (only in ORDER BY), Emtucifor (Erik) suggested the idea of explicit expression aliasing. I like the approach because it makes the query easier to read and increases the SQL developer productivity. What do you think?
Example query for explicit expression aliasing:
SELECT [Year], [Month], SUM (H.TotalDue) TotalSales FROM AdventureWorks2008.Sales.SalesOrderHeader H USING YEAR (H.OrderDate) AS [Year], MONTH (H.OrderDate) AS [Month] WHERE [Year] > 2002 GROUP BY [Year], [Month] ORDER BY [Year], [Month]
This thread is a spin-off from: http://social.msdn.microsoft.com/Forums/en/transactsql/thread/4ad14cad-1e61-43a0-96f8-70a506106a00
ÃÂ
I create an IPCChannel on the server and register a singleton with it.ÃÂ My client creates an instance of this remote object for communication purposes.ÃÂ If the server process is restarted, my client can detect this and willÃÂ try to re-activate the remote object.ÃÂ It seems that if this disconnect/connect to the server happens to quickly, the client will receive a RemotingException indicating "Access Denied".ÃÂ This leads me to believe that cleanup of the named pipe needs to be done when the service shuts down, to ensure it is available immediately upon restart.ÃÂ However, to accomplish this I've tried IPCChannel.StopListening(null), ChannelServices.UnregisterChannel(serverChannel), and also setting the remote object to null on the client -- all to no avail.
I found a newsgroup article where folks report identical behavior with no resolution: http://groups.google.com/group/microsoft.public.dotnet.framework.re
Hi, so on msdn page
http://msdn.microsoft.com/en-us/library/9yb8xew9.aspx
They say
<quote>
The disadvantage of omitting IEnumerable and IEnumerator [in C#] is that the collection class is no longer interoperable with the foreach statements, or equivalents, of other common language runtime-compatible languages.
You can have the best of both worlds, type-safety within C# and interoperability with other common language runtime-compatible languages, by inheriting from IEnumerable and IEnumerator and using explicit interface implementation as demonstrated in the following example.
</quote>
But the example they show right beneath that, does it actually contain any explicit
I have the following C# code in a method of a class that inherits from Image. Basically I'm setting a random left margin (within some parameters) relative to its container (a Grid object).
int auxLeftMargin = rand.Next(Convert.ToInt32( ((Grid)Parent).ActualWidth / 4), Convert.ToInt32(((Grid)Parent).ActualWidth - ((Grid)Parent).ActualWidth / 6));
Margin = new Thickness(auxLeftMargin, Margin.Top, Margin.Right, Margin.Bottom);
I've changed the container type a couple of times already, so I would like to be able to not have it hardcoded. I've tried casting with "( Parent.GetType() )" but it doesn't work.
Is there a way to do this dynamically? Thanks.
Hi
I try to pass my parameter CRM_FilteredSystemUser from my main report to the sub report.
So it's working fine in the main report. And it's working fine as parameter entered by myself testing straight in the subreport.
But I don't know how to set this parameter in the subreport to make this work.
In my main report I pass the CRM_FilteredSystemUser =Fields!systemuserid.Value to the sub report.
My main report has as report parameters : CRM_FilteredSystemUser, Non-queried : SELECT systemuserid,eu_securityrole, eu_reporthubname, fullname, businessunitidname FROM FilteredSystemUser
I'm using as well this parameter in my subreport : ...SELECT businessunitidname, EU_attendanceentry.* FROM EU_attendanceentry INNER JOIN ('+@CRM_FilteredSystemUser+') ....
In my subreport I've a report parameter : CRM_FilteredSystemUser / Non-queried : =Parameters!CRM_FilteredSystemUser.Value
But doint that I've the error: An error occurred while executing the subreport ‘subreport1’: The definition of the report '/Calls per field Day_SubReport' is invalid.
I'm very confused there,
Hi All,
Can anyone help me do explicit FTPs (SSL) connection in c#? Specifically, file uploads.
I am currently using FtpWebRequest. Everything works fine until I enabled SSL via FtpWebRequest.Enabledssl property.
During testing of the module i'm developing, I've encountered an unhandled exception indicating,
"System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The token supplied to the function is invalid"
I've searched the net and found several posts related to this. Found out that implicit SSL connection is not supported by FtpWebRequest (http://dayamn.com/2010/03/ftpwebrequest-with-implicit-ssl-not-possible/). Hence, I wanted to go to exlplicit FTPs/SSL connection.
Any opinions on using Projection or explicit join syntax when joining entities in Linq to SQL? Folks, I would like to know whether people use the join syntax OR projection when joining entities in LINQ to SQL queries. I have noticed that when using projection that a CROSS JOIN is in the generated SQL e.g. var query = from o in Ordersfrom oi in o.OrderItems where oi.OrderId == o.OrderId generates SQL something like... FROM [Customer].[Orders] AS [t0]CROSS JOIN [Customer].[OrderItems] AS [t1]WHERE ([t1].[OrderId] = [t0].[OrderId]) AND ([t1].[OrderId] = [t0].[OrderId]) whereas with explicit joins I get a clean inner join.. var query = from o in Ordersjoin oi in OrderItems on o.OrderId equals oi.OrderId generates.. FROM [Customer].[Orders] AS [t0]INNER JOIN [Customer].[OrderItems] AS [t1] ON [t0].[OrderId] = [t1].[OrderId] I know using explicit joins over projection is frowned upon, but I am wary of those cross joins. Just wondering what other folks preferences are when using joins in L2SQL. Cheers K
Folks,
I would like to know whether people use the join syntax OR projection when joining entities in LINQ to SQL queries. I have noticed that when using projection that a CROSS JOIN is in the generated SQL
e.g.
var query = from o in Ordersfrom oi in o.OrderItems where oi.OrderId == o.OrderId
generates SQL something like...
FROM [Customer].[Orders] AS [t0]CROSS JOIN [Customer].[OrderItems] AS [t1]WHERE ([t1].[OrderId] = [t0].[OrderId]) AND ([t1].[OrderId] = [t0].[OrderId])
whereas with explicit joins I get a clean inner join..
var query = from o in Ordersjoin oi in OrderItems on o.OrderId equals oi.OrderId
generates..
FROM [Customer].[Orders] AS [t0]INNER JOIN [Customer].[OrderItems] AS [t1] ON [t0].[OrderId] = [t1].[OrderId]
I know using explicit joins over projection is frowned upon, but I am wary of those cross joins.
Just wondering what other folks preferences are when using joins in L2SQL.
Cheers
K
I have a single instance of SQL Server 2005 Std SP3 running on a W2003 Server std SP2 called SRVBIZ.
I have a windows domain admin account named ROB\business.
On SRVBIZ, ROB\business is a member of the Administrators group.
In SQL Server, The BUILTIN\Administators group login is enabled is granted permission to connect to the database engine. So ROB\business is a member of this group.
In SQL Server, ROB\business also has it's own explicit login and has dbo permissions on DB1
I now deny permission to connect to the database engine for the BUILTIN\Administrators group.
&nb
Hi there
I am wanting to create an XML file from data within a database.
I have successfully done this using "XmlTextWriter" class.
I now have a sql query outputting performatted xml data and want to "inject" this into the XmlTextWriter rather than interate through a dataset and write the individual nodes.
My code is:
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend