how to Fetch data from database

Discussion in 'jQuery' started by vahidbakhtiary, Feb 5, 2012.

  1. #1
    hi
    i have a Combo and i'll when select it ,i can fetch data from database and fill
    my gridview with them

    please help me
    how to it do
    thanks
     
    vahidbakhtiary, Feb 5, 2012 IP
  2. hyperspace2012

    hyperspace2012 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't directly obtain information from the database. You need to use Ajax to retrieve the information from a dynamic scripting language like PHP. PHP should encode the information into JSON format and then you can use that data within your combo box. Try an existing plugin such as ttp://jquerygridview.com/ or ttp://datatables.net/ rather than attempting to recreate one.
     
    hyperspace2012, Feb 7, 2012 IP
  3. vahidbakhtiary

    vahidbakhtiary Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for your answer
    i want use of C# and Ajax, but i need to help

    please more help me

    thanks
     
    vahidbakhtiary, Feb 8, 2012 IP
  4. hyperspace2012

    hyperspace2012 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi, I'm not a C# developer so I'm unable to help you with this. If you do a search on Google for 'jQuery c# gridview' you'll like find an abundance of relevant information. Good Luck!:)
     
    hyperspace2012, Feb 8, 2012 IP
  5. ivickon

    ivickon Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The first line of the example, "USE mydatabase;", is pretty straightforward. This line defines the query scope and directs SQL to run the command against the MyDatabase object we created earlier in the SQL Databases lesson. The blank line break after the first command is not required, but it makes our query easier to follow. The line starting with the CREATE clause is where we are actually going to tell SQL to create the new table, which is named orders.
    CREATE TABLE orders
    (id INT IDENTITY(1,1) PRIMARY KEY,
    customer VARCHAR(50),
    day_of_order DATETIME,
    product VARCHAR(50),
    quantity INT);
     
    ivickon, Feb 27, 2012 IP