[Opensim-users] OpenSim threw an exception

Teravus Ovares teravus at gmail.com
Mon Jan 24 18:41:14 UTC 2011


Based on the error message, it seems that the mySQL driver was automagically
calling read previous to 5.1 and isn't anymore.


Forcing the developer to call Read() is more in line with the rest of the
ADO.NET world.     This is only a 'system' bug if this is on a DataAdapter.
If that was the case then it would be a bug in Mono's mySQL
implementation.    If this is occurring on a DataReader, then this is an
OpenSimulator bug.   If this is a DataReader then OpenSimulator's mySQL
Connector needs to call Read in order to get access to the first row's data.

Typically, accessing data via ADO.NET using a DataReader looks like,

MySqlDataReader da = cmd.ExecuteReader();
using (da)
{
if (da.HasRows)
{
     while (da.Read())
     {
          // Work With Data
     }
}
}
// explicit close option
// da.Close;
// da.Dispose;

Note how da.Read() is called once before the first row is accessed and again
for each row.    Read() returns true if there are more rows.   False if
there are no more rows

Regards

Teravus



On Mon, Jan 24, 2011 at 1:14 PM, DutchGlory <info at verwijs-pc.nl> wrote:

>
> it seems  mysql is trying to read a database field that isn't  created...
> "Invalid attempt to access a field before calling Read()"  try to close
> opensim and start up again..
> or check mysql connection strings (i think EstateStore connection string)
> within your configuration files...
>
> if nothing works, switch to opensim git repository...  works great now use
> it every day... :)
>
>
> -----
>
> --
> View this message in context:
> http://opensim-users.2152040.n2.nabble.com/OpenSim-threw-an-exception-tp5941095p5956073.html
> Sent from the opensim-users mailing list archive at Nabble.com.
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110124/5b9f1059/attachment.html>


More information about the Opensim-users mailing list