MarkusA

PI OLEDB problems ...

Discussion created by MarkusA on Dec 10, 2009
Latest reply on Dec 14, 2009 by MarkusA

Hallo together,

 

I have a problem with the PI OleDb Provider. I work on a SharePoint Page and want to connect to the piarchive..picomp2 database and update a table. But there is a problem within opening the connection. Error message is something like this: "... properties are in conflict with another Provider instance properties using the same Session ID."

 

Here is a code sample:

string connectionString = "Provider=PIOLEDB.1;Data Source=" + PISERVER + ";Initial Catalog=piarchive;User ID=" + PIUSER + ";Integrated Security=SSPI;";
string sqlQuery = "UPDATE piarchive..picomp2 SET value = '.' WHERE tag = '" + piTag + "' AND time >= 't'";

OleDbConnection myConnection = new OleDbConnection(connectionString);

OleDbCommand myCommand = new OleDbCommand(sqlQuery, myConnection);

try
{
    myConnection.Open();   // here is the error
    myCommand.ExecuteNonQuery();
}

Can anybody help perhaps help here?

 

Greetings,

 

Markus

Outcomes