I have created a project solution with two class projects.
One is used to give information about user and the other one is a dataset
connection properties.
The class with users has reference to dataset.
Now, I created an dll of those project solution.
But, when I call a public function "SetConnectionS tring(string sConnString)"
in users class I get an error : Object reference not set to an instance of
an object !
Why ?
public class in users :
using System;
using System.Collecti ons;
using System.Componen tModel;
using System.Windows. Forms;
using LoginDb;
namespace UserLogin
{
public class Logon
{
LoginDb.Db db = null;
public Logon()
{
}
public void SetConnectionSt ring(string sConnString)
{
db = new Db(sConnString) ;
}
}
}
Hrcko
One is used to give information about user and the other one is a dataset
connection properties.
The class with users has reference to dataset.
Now, I created an dll of those project solution.
But, when I call a public function "SetConnectionS tring(string sConnString)"
in users class I get an error : Object reference not set to an instance of
an object !
Why ?
public class in users :
using System;
using System.Collecti ons;
using System.Componen tModel;
using System.Windows. Forms;
using LoginDb;
namespace UserLogin
{
public class Logon
{
LoginDb.Db db = null;
public Logon()
{
}
public void SetConnectionSt ring(string sConnString)
{
db = new Db(sConnString) ;
}
}
}
Hrcko
Comment