Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL/C#

SQL/C#

Scheduled Pinned Locked Moved Database
helpcsharpdatabase
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Harry2000
    wrote on last edited by
    #1

    Hi I have used this for the slq statem SELCT FirtName, LastName, ID,From Coustomer WHERE FirstName LIKE '[A-Z]' C# private void button1_Click(object sender, System.EventArgs e) { oleDbConnection1.Open(); oleDbDataAdapter2.SelectCommand.Parameters["LastName"].Value = textBox1.Text; dataSet11.Clear(); oleDbDataAdapter2.Fill(dataSet11) oleDbConnection1.Close(); } But when I run it gave a and error can u help me anyone Harrison Brock

    M 1 Reply Last reply
    0
    • H Harry2000

      Hi I have used this for the slq statem SELCT FirtName, LastName, ID,From Coustomer WHERE FirstName LIKE '[A-Z]' C# private void button1_Click(object sender, System.EventArgs e) { oleDbConnection1.Open(); oleDbDataAdapter2.SelectCommand.Parameters["LastName"].Value = textBox1.Text; dataSet11.Clear(); oleDbDataAdapter2.Fill(dataSet11) oleDbConnection1.Close(); } But when I run it gave a and error can u help me anyone Harrison Brock

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      You're not going to get anywhere with SQL unless you spell statements correctly. When posting questions, you really need to copy and paste code accurately (ideally formatting with the <pre> tag), and report error messages exactly. I can currently see at least four errors with your SELECT statement, which (assuming that the data schema is spelled correctly) should look more like

      SELECT FirstName, LastName, ID
      FROM Customer
      WHERE FirstName LIKE '[A-Z]'

      Note spelling of SELECT, FirstName, Customer, and the removal of the comma before FROM.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups