Click to See Complete Forum and Search --> : session cannot be created!! help!!! urgent!!!!!


jayson_13
August 15th, 2002, 05:20 AM
following is the error i get when i run my application.
the error keep on displaying even i had restarted my machine!!

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in design.exe

Additional information: Session cannot be created because maximum number of active sessions was already reached. Consumer must release one or more sessions before creating a new session object.

i have checked my MySQL server and only got one active connection. i have many sql select statement to execute but i only use one recordset... so i guess is not the DB server problem... can anybody tell me what is this problem mean and how to solve?

DSJ
August 15th, 2002, 11:32 AM
Show the line of code that is causing the error...

jayson_13
August 16th, 2002, 06:42 AM
rs = conn.execute(sql)
i found out that if too many select statement are executed then it will give this kind of error...
cos in my function it's like this:
sql = "select many fields.."
rs = conn.execute(sql)

again again and again..
so i found out in which state it gone wrong.then i declare conn1 to subsitute conn. and rs1 replace rs. this must be done.. otherwise the problem occur.
but the funny thing is i still can use the conn in another form.
i dunno what is wrong...

DSJ
August 16th, 2002, 11:01 AM
Don't know unless the DB is parsing your one statement into multiples for processing...???

jayson_13
August 17th, 2002, 12:11 AM
what i feel is the garbage collection works in certain period...
so it can't deallocate the object which is not been used that fast...