D
Dave Bailey
When I execute the following code on a WebForm I get the
following message:
Object reference not set to an instance of an object.
This error occurs at the dataConnection.ConnectionString
command.
public void OpenWorkorder()
{
string connStr
= "Provider=MSDAORA.1;User ID=maximo;Data
Source=Demo;Password=xxxxxx";
dataConnection.ConnectionString =
connStr;
dataConnection.Open();
string strSelect = "Select Wonum
from Workorder where Wonum =" + workorderText.Text;
dataCommand.Connection =
dataConnection;
dataCommand.CommandText =
strSelect;
dataCommand.ExecuteReader();
while (dataReader.Read())
{
string Wonum =
dataReader.GetString(1);
wonumLabel.Text = Wonum;
}
dataReader.Close();
dataConnection.Close();
If anyone could help, Please
Dave
following message:
Object reference not set to an instance of an object.
This error occurs at the dataConnection.ConnectionString
command.
public void OpenWorkorder()
{
string connStr
= "Provider=MSDAORA.1;User ID=maximo;Data
Source=Demo;Password=xxxxxx";
dataConnection.ConnectionString =
connStr;
dataConnection.Open();
string strSelect = "Select Wonum
from Workorder where Wonum =" + workorderText.Text;
dataCommand.Connection =
dataConnection;
dataCommand.CommandText =
strSelect;
dataCommand.ExecuteReader();
while (dataReader.Read())
{
string Wonum =
dataReader.GetString(1);
wonumLabel.Text = Wonum;
}
dataReader.Close();
dataConnection.Close();
If anyone could help, Please
Dave