I have a
public static void SearchRationCreatorName(string RationCreator)
string StrCon = System.Configuration.ConfigurationManager....
OleDbConnection Connection = new OleDbConnection(StrCon);
OleDbDataAdapter DataA = new OleDbDataAdapter
("Select * from tRations where tRations.RationCreator= [RationCreator]", Connection);
DataTable Dtable = new DataTable();
That didn't show up well in the comment. I think you mean
"Select * from tRations where RationCreator= '"+RationCreator+"'"
The way you worded your title suggests you may want to use a string in place of a tablename but your code suggests otherwise. IF you wanted to know how to select from a dynamic table, let me know.
Also, this will select all rows that match rationcreator. If you only want one row, use:
"Select TOP 1 * from tRations where RationCreator= '"+RationCreator+"'"
with or without an ORDER BY predicate