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
  1. Home
  2. General Programming
  3. Visual Basic
  4. last record

last record

Scheduled Pinned Locked Moved Visual Basic
databasehelp
4 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    Manik Nath
    wrote on last edited by
    #1

    Hi ppl, i have a database with only one table named project_name. what i want is that on the page load event the last record of this database should be displayed in a textbox on my web form. how doi do this. i'm using access as my database. please help me. thanks and regards manik

    D 1 Reply Last reply
    0
    • M Manik Nath

      Hi ppl, i have a database with only one table named project_name. what i want is that on the page load event the last record of this database should be displayed in a textbox on my web form. how doi do this. i'm using access as my database. please help me. thanks and regards manik

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      This can easily be done using an SQL statement, something like:

      SELECT LAST(fieldname) AS LastProjectName FROM project_name;

      This will return a single table, with one row under the column name "LastProjectName". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      M 2 Replies Last reply
      0
      • D Dave Kreskowiak

        This can easily be done using an SQL statement, something like:

        SELECT LAST(fieldname) AS LastProjectName FROM project_name;

        This will return a single table, with one row under the column name "LastProjectName". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        M Offline
        M Offline
        Manik Nath
        wrote on last edited by
        #3

        thanx dave, it works. regards manik nath

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          This can easily be done using an SQL statement, something like:

          SELECT LAST(fieldname) AS LastProjectName FROM project_name;

          This will return a single table, with one row under the column name "LastProjectName". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          M Offline
          M Offline
          Manik Nath
          wrote on last edited by
          #4

          sorry to bother you again dave. but the code works fine and gets me the data on to a datagrid. only one single LastProjectName data is returned. but when i try to get the data to a dropdownlist it does not work. how do i do this. also if there is a way by which i can get the data on a datagrid to a textbox. i mean that the datagrid displays the LastProjectName but can i get this value into a textbox. thanx and regards manik

          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