Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9011125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:38:47+00:00 2026-06-16T02:38:47+00:00

I have a program that stores the name, author, and ISBN of a book

  • 0

I have a program that stores the name, author, and ISBN of a book in a XML file. The program works, but I have problem with the search button, it only filter by the whole, but I need it to filter by any word.

I have been searching, and I found this:

private void FilterByType(string type)
{
            var dataView = ((DataTable) this.dataGridView.DataSource).DefaultView;
            dataView.RowFilter = "(Type = '" + type + "')";
}

and this:

dataView.RowFilter = "(Type LIKE *'" + substring + "*')";

The first one works, but like I said it looks for the whole name, and when I try to use the second one I get this message “Syntax error: Missing operand before’*’ operator”.

Hope you can help me, and thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:38:48+00:00Added an answer on June 16, 2026 at 2:38 am

    You misplaced the *. It should be

     "(Type LIKE '*" + substring + "*')"; //moved after the '
    

    Complete reference here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my program; I have an object which stores name, description, languages that he/she
I have written a program that stores booking information in a text file in
I have a C program that stores some object in java store using JNI.
I have program that requires Python 3, but I develop Django and it uses
I have a program that reads from a file that grabs 4 bytes from
I have a program that encrypts files, but adds the extension .safe to the
I have a program that stores user projects as databases. Naturally, the program should
I have an Address Book Program that [1] adds Entry [2] delete entry [3]
I have a program that stores details of sauces. Basically when I get to
I have a Java program that stores a lot of mappings from Strings to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.