The online racing simulator
Datareader Problem Mysql InSim
Problem(ERROR): CNL - There is already an open DataReader associated with this Connection which must be closed first.

What do you recommend to fix?
First: Use InSim.NET.

Second: Show us the code.

Third: Think. The error message tells you what's wrong.
Quote from Bose321 :First: Use InSim.NET.

Second: Show us the code.

Third: Think. The error message tells you what's wrong.

I use .... and convert it to insim.net there is no crashesh but when player leave the server he can't join again
Why not? Error?

Show some code and more information. We can't help on this.
This error is related to the program (InSim in this case) trying to connect to a mysql database through an already opened connection.

First, you need to be sure that you have a "connection.close()" after running your script. Otherwise, you can reach either the pool limit and get errors if another part of the code, which uses the same connection, try to open a connection.

The second thing you should consider is to do not declare the connection outside the function, as a global variable for example.

If the connection is declared outside, all parts of the code will call the SAME connection, which cannot be handled by the MySQL connector you are using.

For example, inside CNL you declare the MySQL connector:


void CNLPacket....blablabla
{
if (some.player == something)
{
MySQLConnection connection = new MySQLConnetion......
connection.open();
YOUR CODE HERE DOING SOMETHING
connection.close();
}
}

Then, if you need to call something on your database in another packet or timer, for example, you call it again for inside that function.

I tried to be clear, but tell us if you didn't understad.
Quote from Skinzinho :This error is related to the program (InSim in this case) trying to connect to a mysql database through an already opened connection.

First, you need to be sure that you have a "connection.close()" after running your script. Otherwise, you can reach either the pool limit and get errors if another part of the code, which uses the same connection, try to open a connection.

The second thing you should consider is to do not declare the connection outside the function, as a global variable for example.

If the connection is declared outside, all parts of the code will call the SAME connection, which cannot be handled by the MySQL connector you are using.

For example, inside CNL you declare the MySQL connector:


void CNLPacket....blablabla
{
if (some.player == something)
{
MySQLConnection connection = new MySQLConnetion......
connection.open();
YOUR CODE HERE DOING SOMETHING
connection.close();
}
}

Then, if you need to call something on your database in another packet or timer, for example, you call it again for inside that function.

I tried to be clear, but tell us if you didn't understad.

thank you. The problem comes from a value that is returned as false at user exit. There is no solution yet, but there is no problem.

FGED GREDG RDFGDR GSFDG