我正在将遗留的SQLS2k迁移到2008R2,似乎所有数据访问都是通过存储过程完成的,并且任何自定义查询都使用旧的*= =*外连接语法.有超过一百个proc所以我不想单独打开每一个以查看它是否使用该语法(大多数不会),是否有一种方法可以查询元数据以获取一个procs/functions/views列表/触发器,然后循环搜索*=或=*字符串,打印出违规对象的名称?
我的背景是oracle,我知道如何在那里找到元数据视图,但我对Sql Server有点新.降级兼容性版本不是一种选择.
谢谢!
所以我正在玩geotools,我想我会代理他们的一个数据访问类,并跟踪它们在代码中的使用方式.
我编写了一个动态代理并在其中包含了一个FeatureSource(接口),并且很高兴.然后我想看看一些由featureSource返回,以及在传递对象,因为FeatureSource做的主要工作是返回的FeatureCollection(FeatureSource类似于一个SQL数据源,并以的FeatureCollection SQL语句).
在我的InvocationHandler我刚刚通过的调用底层对象,打印出目标类/方法/指定参数和结果,我去了,但是对于返回的FeatureCollection(另一个接口)调用,我裹着该对象在我的代理服务器(在相同的类,但一个新的实例,应该不重要吗?)并返回它.BAM!Classcast异常:
java.lang.ClassCastException: $Proxy5 cannot be cast to org.geotools.feature.FeatureCollection
at $Proxy4.getFeatures(Unknown Source)
at MyClass.myTestMethod(MyClass.java:295)
Run Code Online (Sandbox Code Playgroud)
调用代码:
FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = ... // create the FS
featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) FeatureSourceProxy.newInstance(featureSource, features);
featureSource.getBounds();// ok
featureSource.getSupportedHints();// ok
DefaultQuery query1 = new DefaultQuery(DefaultQuery.ALL);
FeatureCollection<SimpleFeatureType, SimpleFeature> results = featureSource.getFeatures(query1); //<- explosion here
Run Code Online (Sandbox Code Playgroud)
代理人:
public class FeatureSourceProxy implements java.lang.reflect.InvocationHandler {
private Object target;
private List<SimpleFeature> features;
public static Object newInstance(Object obj, List<SimpleFeature> features) {
return java.lang.reflect.Proxy.newProxyInstance(
obj.getClass().getClassLoader(),
obj.getClass().getInterfaces(),
new FeatureSourceProxy(obj, features)
);
}
private …Run Code Online (Sandbox Code Playgroud) 从SQL Server 2000迁移旧数据库,并且有一些使用SP_OACreate&CDOSYS发送电子邮件到开放SMTP中继的计划任务,如此知识库文章中所述:http://support.microsoft.com/kb/312839
在SQL Server 2008 R2中,替换sendmail功能的最佳(最简单)方法是什么?似乎DB Mail是新推荐的最佳方式,任何人都有这方面的经验或其他选择吗?
通过单击一次将 VS2003 1.1 windows 窗体应用程序更新到 VS2010,我们还必须升级应用程序中使用的水晶报表的版本。
如果用户有本地管理员,一切都会完美运行。不幸的是,我们的大多数用户都处于极度锁定状态,无法安装任何东西。这给安装 CR13 二进制文件带来了问题。在单击一次设置中,我已将所有 CrystalDecisions.* dll 标记为“包含/必需”,但它们不会发布到部署文件夹,因此不会复制到具有其他第 3 方库的用户计算机。这意味着应用程序启动正常,但一旦用户尝试运行报告,就会收到以下错误:
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
Run Code Online (Sandbox Code Playgroud)
尽管它被标记为“包含/必需”,但该文件并未被部署。我真的不想追查每个用户并手动安装它(我们没有执行组策略推送的选项)。我们使用四个 Crystal dll:
其中,只有引擎正在实际部署!有谁知道为什么 click-once 不部署其他的(尤其是 Windows Forms dll)以及我如何说服它?
谢谢!
编辑:尝试删除对 Crystal dll 的现有引用(它指向“C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet”下的 Crystal 安装,将它们复制到项目中并通过“浏览”选项卡添加它们,但它们仍然没有部署:(这几乎就像它们设置了一个标志来表示它们不应该被部署,所以 Visual Studio …
clickonce visual-studio-2010 crystal-reports crystal-reports-2010
我使用dotnet 3.5和ComponentFactory Krypton v4.4.0.0支持Winforms应用程序,最近我实现了AppDomain.CurrentDomain.UnhandledException和Application.ThreadException处理程序,以通知我客户端上发生的异常,并发现了很多错误在日志中。此刻正在我的脑海:
System.ArgumentException: Parameter is not valid.
at System.Drawing.Font.GetHeight(Graphics graphics)
at System.Drawing.Font.GetHeight()
at System.Drawing.Font.get_Height()
at System.Windows.Forms.Control.set_Font(Font value)
at System.Windows.Forms.DataGridViewComboBoxEditingControl.ApplyCellStyleToEditingControl(DataGridViewCellStyledataGridViewCellStyle)
at System.Windows.Forms.DataGridView.BeginEditInternal(Boolean selectAll)
at System.Windows.Forms.DataGridView.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.DataGridView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam,IntPtr lparam)
Run Code Online (Sandbox Code Playgroud)
请注意,stacktrace完全在Windows代码中。我的一门课还有另外一门课:
System.ArgumentException: Parameter is not valid.
at System.Drawing.Font.GetHeight(Graphics graphics)
at System.Drawing.Font.GetHeight()
at System.Drawing.Font.get_Height()
at System.Windows.Forms.Control.set_Font(Font value)
at MyOrg.MyApp.WindowsClient.GuiControls.MaskedTextBoxEditingControl.ApplyCellStyleToEditingControl(DataGridViewCellStyledataGridViewCellStyle)
at System.Windows.Forms.DataGridView.BeginEditInternal(Boolean selectAll)
at System.Windows.Forms.DataGridView.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) …Run Code Online (Sandbox Code Playgroud) sql-server ×2
.net ×1
clickonce ×1
gdi+ ×1
geotools ×1
java ×1
join ×1
outer-join ×1
proxy ×1
reflection ×1
sendmail ×1
winforms ×1