getting id from database

Posted on 2016-11-17
Medium Priority
Last Modified: 2017-01-17
is their any way to get the first id from the database when the site load with table for first time
Question by:karthik80c
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 32

Expert Comment

by:Pawan Kumar
ID: 41892489
first id from the database when the site load with table for first time

Can you explain more , what exactly are you doing ?

Author Comment

ID: 41892531
hi Pawan Kumar Khowal,

i can able to create a view (i,e i can able to select require column and can be inserted in to db with id) for my table.this will be show as drop down list in another page.currently this page is loading without any table for first time.is there any possibility to select first id by default when the page load
LVL 32

Accepted Solution

Pawan Kumar earned 2000 total points
ID: 41895275
When the table is loaded, before that you call the below statement is a sp or you can call it directly.

SELECT TOP 1 Column FROM TableName

Also if you are sure that the value in the table will not change you can also hardcode the value.

Hope it helps !

Author Comment

ID: 41895358
Thank you MR.Pawan Kumar Khowal
LVL 32

Expert Comment

by:Pawan Kumar
ID: 41895362
Welcome karthik80c !!

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question