This is a migrated thread and some comments may be shown as answers.
Excute IQueryResult not work
1 Answer 15 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phạm Quang
Top achievements
Rank 1
Phạm Quang asked on 09 Aug 2012, 08:26 AM
Hi all,
I have proplem. This is my code:
string strQuery = "SELECT mmsi,nvl(imo,0),nvl(name,''),nvl(callsign,''),country_id,nvl(type_id,0),nvl(length,0),nvl(width,0),nvl(draugth,0),cog,sog,rot, longitude,latitude,nvl(status_id,0),nvl(heading,0),eta,nvl(destination,''),last_received " +
            "FROM table(ais_vessel_pkg.get_vessels(P_FIRST=>?,P_LAST=>?,P_LONG_FIRST=>?, P_LONG_LAST=>?,P_MMSIS=>?,P_SOURCE=>?))";
        long lAgentID = 0;
if (!string.IsNullOrEmpty(agentID)) {
lAgentID = Convert.ToInt64(agentID);
}

          IQuery query = scope.GetSqlQuery(strQuery, null, "DATE p_first,DATE p_last ,number p_long_first,number p_long_last,VARCHAR2 p_mmsis,number p_source");
        var queryResult = query.Execute(first, last, 0, 0, mmsis, lAgentID);
  
foreach (object[] obj in queryResult)
                {
                    ......
                }


But it is to stand forever line "foreach (object[] obj in queryResult) ". Please !, help me
"

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 09 Aug 2012, 10:35 AM
Could it be that the function get_vessels is not returning in time?
Also, please verify if the SQL should not be :

string strQuery = "SELECT mmsi,nvl(imo,0),nvl(name,''),nvl(callsign,''),country_id,nvl(type_id,0),nvl(length,0),nvl(width,0),nvl(draugth,0),cog,sog,rot, longitude,latitude,nvl(status_id,0),nvl(heading,0),eta,nvl(destination,''),last_received " +
"FROM table(ais_vessel_pkg.get_vessels(P_FIRST=?,P_LAST=?,P_LONG_FIRST=?, P_LONG_LAST=?,P_MMSIS=?,P_SOURCE=?))";

(> erased)


Kind regards,
Thomas
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Tags
LINQ (LINQ specific questions)
Asked by
Phạm Quang
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or