It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming ASP & ASP.NET Forum

Begininer, needing help with ASP numeracy - Happy Christmas

Begininer, needing help with ASP numeracy - Happy Christmas

Postby knightm22 on Wed Dec 22, 2004 10:38 am

Hi,

I need to display in my form fields the last record in my access database, which is a numerical value, then add 1 to that value.

The code i have so far is:

<%
' Name of the Accessdb being read
accessdb="form1"

' Connect to the db with a DSN-less connection
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)

' Create a server recordset object
Set rs = Server.CreateObject("ADODB.Recordset")

rs.CursorType = 3

' Select specific fields from the table the_bird
sql = "select t1004, t6103 from doc"


' Execute the sql
rs.Open sql, cn
%>


<%

rs.movelast

%>


<%= rs("t1004") %>">
<%= rs("t6103") %>">
knightm22
 
Posts: 0
Joined: Wed Dec 22, 2004 10:36 am
Location: York, UK

Who is online

Users browsing this forum: No registered users and 1 guest