473,386 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need help with dbcommand text in Web Developer

I am creating a fairly simple web app but I am having some trouble with the database access at this point. I need to select a single row which is the most current (has the highest record autonumber). . It is selecting a variable table from a database and works fine if I tell it what to select, but I need to know how I can tell it to pick the highest number. The snippet of code is below. "HIGHEST NUMBER" is obviously where i need to know the correct syntax.

dbcommand.CommandText = "Select * from " & Session("Company") & " where Record = HIGHEST NUMBER"

I am doing this for an internship so it would be great it someone could help me out and make me look good!
Jun 25 '07 #1
0 955

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mike | last post by:
can some look at this select statement and tell me whats wrong with it/ I keep getting an error on the SELECT. dbCommand = New SqlDataAdapter("select EffectiveDate,RD as type" & _ "SELECT Case...
2
by: naija naija | last post by:
Hello guys i made a Datagrid with Editing,Update and Cancel using VS.NET. to my surprise nothing is on the screen after compilation .. By code below:- Imports System.Data Imports...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
2
by: Polyhedron_12 | last post by:
I am having problems calling functions in general in VB. I keep getting alot of errors. Can anybody help me out with this? I put the error message on the same line that it says it is at. I believe...
4
by: Materialised | last post by:
I am having a problem, inserting 4 items into a database table. The database table simply consists of 4 records: Date Com Note Name All fields are of type 'Text'
0
by: RobbieB | last post by:
Hey, wondering if someone could help me out here!?!? Ive created a basic feature to my website where the user can update their account details etc. The problem is that when the save changes...
1
by: Erland | last post by:
Hi all, I have created a simple database table in ACCESS named as "Users" that contains only two fields "UserID" ( Primary key )and "Password". I am having problems while UPDATING the records in...
2
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.