Click here to Skip to main content
16,012,223 members
Home / Discussions / C#
   

C#

 
GeneralRe: A question Pin
MyBlindy22-May-04 8:52
MyBlindy22-May-04 8:52 
General"The file 'APSDatabase.dll' cannot be copied to the run directory." Pin
Steve Schaneville21-May-04 9:07
professionalSteve Schaneville21-May-04 9:07 
GeneralRe: "The file 'APSDatabase.dll' cannot be copied to the run directory." Pin
Heath Stewart21-May-04 9:18
protectorHeath Stewart21-May-04 9:18 
GeneralRe: "The file 'APSDatabase.dll' cannot be copied to the run directory." Pin
Steve Schaneville21-May-04 10:01
professionalSteve Schaneville21-May-04 10:01 
GeneralUnsubscribing from an event Pin
ABean21-May-04 7:26
ABean21-May-04 7:26 
GeneralRe: Unsubscribing from an event Pin
Charlie Williams21-May-04 7:56
Charlie Williams21-May-04 7:56 
GeneralDataTable Pin
IamADotNetGuy21-May-04 7:26
IamADotNetGuy21-May-04 7:26 
GeneralRe: DataTable Pin
Heath Stewart21-May-04 8:53
protectorHeath Stewart21-May-04 8:53 
You can't. Instead, split your array and pass each value as part of the WHERE clause:
private DataRow[] SelectRows(string field, string[] values)
{
  if (field == null || values == null)
    throw new ArgumentNullException(field == null ? "field" : "values");
  if (values.Length < 1) throw new ArgumentException();
 
  StringBuilder sb = new StringBuilder();
  for (int i=0; i<values.Length; i++)
  {
    sb.AppendFormat("{0} = {1}", field, value);
    if (i < (values.Length - 1))
      sb.Append(" AND ");
    return dataTable1.Select(sb.ToString());
}


 

Microsoft MVP, Visual C#
My Articles
GeneralListView on select Pin
Adam Hable21-May-04 6:44
Adam Hable21-May-04 6:44 
GeneralRe: ListView on select Pin
Heath Stewart21-May-04 6:57
protectorHeath Stewart21-May-04 6:57 
GeneralRe: ListView on select Pin
Adam Hable21-May-04 9:10
Adam Hable21-May-04 9:10 
GeneralRe: ListView on select Pin
Heath Stewart21-May-04 9:18
protectorHeath Stewart21-May-04 9:18 
GeneralRe: ListView on select Pin
Adam Hable21-May-04 9:21
Adam Hable21-May-04 9:21 
GeneralRe: ListView on select Pin
Heath Stewart21-May-04 9:35
protectorHeath Stewart21-May-04 9:35 
GeneralRe: ListView on select Pin
Adam Hable21-May-04 9:55
Adam Hable21-May-04 9:55 
GeneralRe: ListView on select Pin
Heath Stewart21-May-04 9:57
protectorHeath Stewart21-May-04 9:57 
GeneralRe: ListView on select Pin
valikac21-May-04 7:08
valikac21-May-04 7:08 
GeneralRe: ListView on select Pin
Heath Stewart21-May-04 9:20
protectorHeath Stewart21-May-04 9:20 
GeneralOne about Remoting Pin
Diego F.21-May-04 6:22
Diego F.21-May-04 6:22 
GeneralRe: One about Remoting Pin
Heath Stewart21-May-04 6:46
protectorHeath Stewart21-May-04 6:46 
GeneralRe: One about Remoting Pin
Diego F.21-May-04 7:56
Diego F.21-May-04 7:56 
GeneralRe: One about Remoting Pin
Heath Stewart21-May-04 8:48
protectorHeath Stewart21-May-04 8:48 
GeneralRe: One about Remoting Pin
Diego F.22-May-04 4:06
Diego F.22-May-04 4:06 
GeneralRe: One about Remoting Pin
Heath Stewart22-May-04 4:11
protectorHeath Stewart22-May-04 4:11 
GeneralRe: One about Remoting Pin
Diego F.24-May-04 5:42
Diego F.24-May-04 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.