While in Interactive SQL, one can enable Sybase to return multiple results by setting the isql_show_multiple_result_sets, and supposedly with an ODBC connection such should work from C#/.NET (not tested yet by us), as we use an OLEDB connector, we have not been able to figure out how to make such work. As far as I can see, there's a DBPROP that should be set Reflection of OleDBDataReader code But I cannot seem to pull together something that works. Has anybody succeeded with this in Sybase Anywhere 12 (ASA12)? |
Use a DataAdpater and fill a DataSet (and hope that the implementation of the DataAdapter really obey to the documentation) From MSDN: "When multiple result sets are added to the DataSet each result set is placed in a separate table" The docs for OleDbDataReader::NextResult() say this: Used to process multiple results that can be generated by executing batch SQL statements. http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader.nextresult.aspx
(11 Jun '12, 13:59)
Breck Carter
|
Wouldn't OleDbDataReader::NextResult() do the trick?
It seems similar to SADataReader's NextResult() method - but that's just a guess...
NextResult will only return the next row of the result set, but not multiple result sets.
@Martin: "Used to process multiple results that can be generated by executing batch SQL statements." http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader.nextresult.aspx
@Martin: I don' think so (but I haven't tested that) - reading the next row is what DbDataReader.Read() is for, whereas Eric askes for the next result set...
@Breck, @Volker: You are right, I mixed it with the Read function...
...and now we are waiting on Eric's test results...