using System;
using System.Data;
using System.Data.OleDb;
class Program
{
static void Main()
{
string str = "Provider=SQLOLEDB;Data Source=myaglist;Initial Catalog=mytestdb;"
+ "Integrated Security=SSPI;application intent=readonly";
datadelete(str);
}
private static void datadelete(string connectionString)
{
string queryString =
"select * from testinging";
using (OleDbConnection connection =
new OleDbConnection (connectionString))
{
OleDbCommand command =
new OleDbCommand (queryString, connection);
connection.Open();
command.ExecuteNonQuery();
}
}
}
I have the above .net project having the above code, but it seems no putting me to the secondary replica ..
How everver using sqlclient System.Data.SqlClient, the same code work .. of coz using applicationintent (without space)..
why ? Any idea ?