小编Gar*_*eth的帖子

带有IN语句的Oracle参数?

得到了我需要修改的#.net应用程序.此刻的查询有效地做到了这一点:

select * from contract where contractnum = :ContractNum
Run Code Online (Sandbox Code Playgroud)

(非常简化,只是为了表明我们正在使用=和一个参数)

该参数从C#app上的Settings.Settings文件中读取,并且其中包含一个字符串.我需要修改它以包含多个合同,所以我想我可以将SQL更改为:

select * from contract where contractnum in (:ContractNum)
Run Code Online (Sandbox Code Playgroud)

但无论我如何格式化参数中的字符串,都不会返回任何结果.

有没有办法让oracle用参数做一个IN?

任何帮助表示感谢,谢谢大家.

c# sql oracle parameters oracle10g

7
推荐指数
3
解决办法
2万
查看次数

C#:反序列化XML文件错误(认为这是一个命名空间问题 - 但是我的生活不能解决它)

我正在对一个XML文件进行反序列化,该文件来自我们的一个客户的Web服务.

问题是,在使用xsd.exe创建类之后,我将文件反序列化并获得通常的"XML文档中存在错误(2,2)".视觉工作室错误.这个,我假设是第2行,它指向命名空间声明:

XML文件的顶部:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"     xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
 <soapenv:Body><MXWorkorderOutResp language="EN" xmlns="http://www.mro.com/mx/integration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header event="0" operation="Response" rsCount="8" rsStart="0" rsTotal="8">
    <SenderID build="127" dbbuild="V600-467" majorversion="6" minorversion="1" type="MAXIMO">MX</SenderID>
    <CreationDateTime>2009-05-11T09:48:51+01:00</CreationDateTime>
    <RecipientID>SUPPLIER</RecipientID>
    <MessageID>12420317323327108</MessageID>
  </Header>
  <Content>
    <MXWORKORDER>
      <WORKORDER>
Run Code Online (Sandbox Code Playgroud)

顶级:

[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.mro.com/mx/integration")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.mro.com/mx/integration", IsNullable=false)]


public partial class MXWorkorderOutResp {

private MXWorkorderOutRespHeader[] headerField;

private MXWorkorderOutRespContentMXWORKORDERWORKORDER[][][] contentField;

private string languageField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("Header")]
public MXWorkorderOutRespHeader[] Header {
    get {
        return this.headerField;
    }
    set {
        this.headerField = value;
    }
}

/// <remarks/>
[System.Xml.Serialization.XmlArrayItemAttribute("MXWORKORDER", typeof(MXWorkorderOutRespContentMXWORKORDERWORKORDER[]), …
Run Code Online (Sandbox Code Playgroud)

c# xml web-services xml-serialization

6
推荐指数
1
解决办法
1万
查看次数

Oracle日期格式"2009-02-13T11:46:40 + 00:00"

我之前得到了一些很棒的帮助,我希望你能再次让我离开一个洞.

我有一个来自网络服务的日期:2009-02-13T11:46:40 + 00:00

对我来说,它看起来像标准的UTC格式.

我需要将它插入到Oracle数据库中,所以我在插入时使用to_date().问题是,我无法得到匹配的格式化字符串,并继续得到"ORA-01861:文字与格式字符串不匹配"错误.

我知道它是一个相当微不足道的问题,但由于某种原因我不能让它接受正确的格式字符串.任何帮助赞赏.

谢谢 :)

加雷思

oracle formatting date

3
推荐指数
2
解决办法
1万
查看次数