tags:

views:

255

answers:

1

Hello Sir,

I am using MySql 5.0. I using Mupliple datareader in same connection i get error message. Is possible to use multiple Datareader in same connection?

I using Mysql Connection is

MySqlConn.ConnectionString = "SERVER=" & gServerName & ";DATABASE=" & DBname & ";user=" & gUserName & ";password=" & gPassword & ";MultipleActiveResultSets=True"
MySqlConn.Open()

Please Help Me

+1  A: 

The DataReader usually (excluding SQL Server 2005+) requires a connection all to itself while it is Executing. Until the DataReader's Close method is called, the connection cannot be used by anything else including another DataReader. However, you can use the DataReader's NextResult method to let it process multiple sets of records one after another.

CodeByMoonlight
IS possible to use multiple datareader in same connection in mysql5.0?
somu
What data provider are you using for the Connection object?
CodeByMoonlight
The MySqlDataReader doesn't support, i doubt the OledbDataReader or OdbcDataReader support it, so i'll say no. http://dev.mysql.com/doc/refman/5.0/es/connector-net-examples-mysqldatareader.html
CodeByMoonlight
ok thanks for your suggestions
somu