This is may c# code

namespace DBCompare
public class MSAccess
public int ConnectToAccess(string dbName)
// Set the access database connection string
string ConnString = "Provider=Microsoft.Jet.OLEDB.4.0" +
";Data Source=c:\\DB.mdb";

System.Data.OleDb.OleDbConnection conn = new
// test the connection with an open attempt
MessageBox.Show("Connection attempt successful.",
"Connection Test");
catch (Exception ex)
// inform the user if the connection test failed
MessageBox.Show(ex.Message, "Connection Test");
return -1;

return 1;

Attacth my c# dll as assembly to my powerbuilder application
In userobject create an instance of dll but when lunch application I have
this error:

Exception thrown has not been handled.: SystemTypeLoadException in clicked
event of object cb_1 of w_dbcompare

Anyone can help me?