Note that there are some explanatory texts on larger screens.

plurals
  1. POStrongly typed dataset wont fill, table mappings problem? c#.net 2.0
    primarykey
    data
    text
    <p>You've been excellent with my other questions previously - so here I am again, in need of some help!</p> <p>I've got a query which joins three tables and a strongly typed dataset which has the columns defined for everything which comes back from the query. When I go to fill the dataadapter, nothing gets filled. I've copied the code from another method, so I presume it's okay - the only difference is that this query has joins. Any help appreciated, code follows:</p> <p><strong>Query:</strong></p> <p><code>select gsh.locid, locations.description, GSH.workorder, GSH.comstatus, GSH.teststatus, GSH.fireresult, GSH.lightresult, GSH.watercold, GSH.waterhot, GSH.responsedate, GSH.comments, GSH.testername from gsh_vhs_locations locs left outer join locations on locs.maximoloc = locations.location left outer join gsh_vhs_comms GSH on locs.LOCID = GSH.locid where gsh.insertdate &gt; sysdate-7 order by locid, locations.description, GSH.workorder, GSH.comstatus, GSH.teststatus, GSH.fireresult, GSH.lightresult, GSH.watercold, GSH.waterhot, GSH.responsedate, GSH.comments, GSH.testername</code> </p> <p><strong>Code:</strong></p> <pre><code>ResponseSheet Tests = new ResponseSheet(); DataSet ReturData = new DataSet(); OracleDataAdapter da; try { using (OracleConnection conn = new OracleConnection(ConnString)) { conn.Open(); OracleCommand cmd = new OracleCommand(); cmd.Connection = conn; cmd.CommandText = @"select gsh.locid, locations.description, GSH.workorder, GSH.comstatus, GSH.teststatus, GSH.fireresult, GSH.lightresult, GSH.watercold, GSH.waterhot, GSH.responsedate, GSH.comments, GSH.testername from gsh_vhs_locations locs left outer join locations on locs.maximoloc = locations.location left outer join gsh_vhs_comms GSH on locs.LOCID = GSH.locid where gsh.insertdate &gt; sysdate-7 order by locid, locations.description, GSH.workorder, GSH.comstatus, GSH.teststatus, GSH.fireresult, GSH.lightresult, GSH.watercold, GSH.waterhot, GSH.responsedate, GSH.comments, GSH.testername "; da = new OracleDataAdapter(cmd.CommandText, conn); da.MissingMappingAction = MissingMappingAction.Error; da.TableMappings.Add("Table", "ResponseSheet"); da.Fill(ReturData, "ResponseSheet"); } } catch (Exception ex) { Console.WriteLine(TimeStamp() + ex.Message.ToString() + "Get Capture Report (TraceCode: 00019)"); } return ReturData; } </code></pre> <p>As you can see, I've turned the error reporting for table mappings on, but I get no errors at run time, just an empty dataset (da = null)</p> <p>Anything you can help with guys, just poke random google phrases at me if needs be - thanks :)</p> <p>Gareth</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload