H
Hrvoje Voda
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 "SetConnectionString(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.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using LoginDb;
namespace UserLogin
{
public class Logon
{
LoginDb.Db db = null;
public Logon()
{
}
public void SetConnectionString(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 "SetConnectionString(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.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using LoginDb;
namespace UserLogin
{
public class Logon
{
LoginDb.Db db = null;
public Logon()
{
}
public void SetConnectionString(string sConnString)
{
db = new Db(sConnString);
}
}
}
Hrcko