csharp Dapper ODBC QueryMultiple Error

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Dapper ODBC QueryMultiple Error相关的知识,希望对你有一定的参考价值。

/*
  Pieces of code that is being executed

*/


// our variable holding the query
private static string QUERY_ADMISSION_PERSONAL_DATA = 
@"
SELECT QCLCOGNO as LastName, QCLNOME as FirstName, QCLLINGUA as PrintLanguage FROM JXPLURIF.QUADCL00F WHERE QCLDONUM=?
SELECT QRIVALORE as Consort FROM JXPLURIF.QUADRI00F WHERE QRIDONUM=? AND QRICODICE='0106'
SELECT QRIVALORE as Children FROM JXPLURIF.QUADRI00F WHERE QRIDONUM=? AND QRICODICE='0107'
SELECT QRIVALORE as DependentChildren FROM JXPLURIF.QUADRI00F WHERE QRIDONUM=? AND QRICODICE='0108'
SELECT QRIVALORE as Family FROM JXPLURIF.QUADRI00F WHERE QRIDONUM=? AND QRICODICE='0109'
SELECT QRIVALORE as DependentFamily FROM JXPLURIF.QUADRI00F WHERE QRIDONUM=? AND QRICODICE='0110'";

...

// our ODBC connection
var conn =new OdbcConnection();
...


// querying
using (var multi = conn.QueryMultiple(QUERY_ADMISSION_PERSONAL_DATA, new DynamicParameters(
                 new
                 {
                     Id = id
                 })))
{    
  ...
}

// the following exception is thrown
"ERROR [42000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0199 - Keyword SELECT not expected. Valid tokens: FOR WITH FETCH ORDER UNION EXCEPT OPTIMIZE.",

以上是关于csharp Dapper ODBC QueryMultiple Error的主要内容,如果未能解决你的问题,请参考以下文章

csharp Dapper Insert #dapper

csharp [03] Dapper Select类型#dapper

csharp [002] Dapper Select没有#dapper类型

csharp: mappings using Dapper-Extensions+Dapper.net.

csharp Dapper DapperExtension使支持Oracle

csharp Dapper DapperExtension使支持Oracle