S
Steve1 via DotNetMonster.com
Hi all,
Why is the last line of this code snippit pulling up with an error? Any help
will be appreciated - Thanks, Steve.
string str_SQLLayoutsPound = "SELECT * FROM Layouts ORDER BY Name";
OleDbCommand obj_SQLLayoutsPound = new OleDbCommand( str_SQLLayoutsPound,
obj_SourceConn );
OleDbDataReader obj_ReaderLayoutsPound = obj_SQLLayoutsPound.ExecuteReader();
while( obj_ReaderLayoutsPound.Read())
{
string str_CurrentRecord = obj_ReaderLayoutsPound["Name"].ToString();
string str_SQLLayouts = "SELECT * FROM Layouts WHERE [Name] LIKE '" +
str_CurrentRecord + "' AND Currency = 1" ;
OleDbCommand obj_SQLLayouts = new OleDbCommand( str_SQLLayouts,
obj_DestinationConn );
OleDbDataReader obj_ReaderLayouts = obj_SQLLayouts.ExecuteReader();
if( obj_ReaderLayouts.Read())
{
OleDbDataAdapter obj_AdapterLayouts = new OleDbDataAdapter(
str_SQLLayouts, obj_DestinationConn );
DataSet obj_DatasetLayouts = new DataSet();
obj_AdapterLayouts.Fill( obj_DatasetLayouts, "layouts" );
}
}
Why is the last line of this code snippit pulling up with an error? Any help
will be appreciated - Thanks, Steve.
string str_SQLLayoutsPound = "SELECT * FROM Layouts ORDER BY Name";
OleDbCommand obj_SQLLayoutsPound = new OleDbCommand( str_SQLLayoutsPound,
obj_SourceConn );
OleDbDataReader obj_ReaderLayoutsPound = obj_SQLLayoutsPound.ExecuteReader();
while( obj_ReaderLayoutsPound.Read())
{
string str_CurrentRecord = obj_ReaderLayoutsPound["Name"].ToString();
string str_SQLLayouts = "SELECT * FROM Layouts WHERE [Name] LIKE '" +
str_CurrentRecord + "' AND Currency = 1" ;
OleDbCommand obj_SQLLayouts = new OleDbCommand( str_SQLLayouts,
obj_DestinationConn );
OleDbDataReader obj_ReaderLayouts = obj_SQLLayouts.ExecuteReader();
if( obj_ReaderLayouts.Read())
{
OleDbDataAdapter obj_AdapterLayouts = new OleDbDataAdapter(
str_SQLLayouts, obj_DestinationConn );
DataSet obj_DatasetLayouts = new DataSet();
obj_AdapterLayouts.Fill( obj_DatasetLayouts, "layouts" );
}
}