我刚刚从32位Windows 7桌面迁移到64位Windows 7笔记本电脑.我们正在开发一个包含解决方案中大约60个项目的C#程序.我在尝试构建时遇到以下错误:
Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed
Run Code Online (Sandbox Code Playgroud)
显然这个错误是非常自我解释的,我试图让我的整个解决方案以32位模式加载.我已经完成了每个项目,并将目标平台设置为x86,但我仍然遇到此错误.我搜索过谷歌并看到了无数不同的方法,但我似乎无法解决这个问题.确保我的项目在64位计算机上以32位模式运行的最佳方法是什么?
我正在使用Visual Studio 2008.我目前正在考虑降级到32位,但我真的想避免这样做.
我有以下型号:
public class ContractPlain
{
public int Id { get; set; }
public Guid ContractGuid { get; set; }
public int SenderId { get; set; }
public int RecvId { get; set; }
public int ContractType { get; set; }
public string ContractStatus { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime CreditEnd { get; set; }
}
public class Contrtacts
{
List<ContractPlain> listOutput;
public void Build(List<ContractPlain> listInput)
{
listOutput = new List<ContractPlain>();
}
public List<ContractPlain> …Run Code Online (Sandbox Code Playgroud) 我想测量在 SQL Server 中执行存储过程所需的时间。但不仅仅是测量整个存储过程的执行,我还想测量存储过程中每个操作所花费的时间,以便我可以找到瓶颈。
在 c# 中,为了在测试代码执行时间时完成这样的事情,我会在执行开始之前保存日期,当执行结束时,我将通过从当前时间(执行后)中减去开始时间来打印给我的 TimeSpan 对象。
我想知道如何在存储过程中使用 SQL Server 实现这样的事情,在那里我可以打印我在存储过程中的操作之间测量的时间跨度。
谢谢