Here is source code:

FbCommand cmd = BuildCommand(DbCommand);

cmd.Parameters.AddWithValue("@from", From);
cmd.Parameters.AddWithValue("@to", To);
cmd.Parameters.AddWithValue("@code", Code);

try
{
  cmd.Connection.Open();
  
  //This needs 0.028 seconds.
  return cmd.ExecuteReader(CommandBehavior.CloseConnection);
}

[PM] 

Try something like :

FbCommand cmd = BuildCommand(DbCommand);


try
{
  cmd.Connection.Open(); <- //This needs 0.028 seconds.
  
 

Foreach (DataRow parameter in YourParamlist)

{

Get your param ….

>From = parameter[“From].ToString();

……

 

cmd.Parameters.AddWithValue("@from", From);
cmd.Parameters.AddWithValue("@to", To);
cmd.Parameters.AddWithValue("@code", Code);
FBDataReader dr  = cmd.ExecuteReader();

while (dr.Read())

{

Do what you need;

}

}


 
}

[PM] 

I sustain that this will run faster with SP !

 

Regards,

Paul

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to