[ Inventory Management System ]
This software is designed to manage your inventory system, with a facility of adding, modifying, deleting, viewing, searching, and analyzing a item stored in an inventory. This all functionality is very well comprised using Graphics Outlet for user to go on with it!!!
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Upload
<%
Option Explicit
'CopyRight 2001 DotAnything Inc.
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
' Application description
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
' Variables
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
'database variables
Dim rs 'recordset
Dim SQL 'sql statement
Dim conn 'connection
'This will call the SUB "main" and get the app started
Main
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
' Functions and Subs
'~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
'Main Sub where most application proccessing will take place
Sub Main()
Dim vF 'form fields place holder
'This si the SQL statment which will determine what kind of data is opened.
SQL = "SELECT tbl_Main.*"
SQL = SQL & " FROM tbl_Main"
SQL = SQL & " WHERE (((tbl_Main.fld_uid)=" & Request.Form("fld_uid") & "))"
'Create a connection to the database
'We will use a DSN DB called "myDB"
Set Server.CreateObject("ADODB.Connection")
conn.Open "DSN=myDB"
'now we will create and open a recordset based on a user ID
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQL, conn, 2, 2
'If no records were returned we know that this user does not have a record in this table.
'So we add one.
If rs.EOF Then
'Add New record
rs.AddNew
'rs.Fields("fld_uid") = Request.Form("fld_uid") & ""
'Here you will see hte For..Each..Next work it's
'magic.
'vF will contian the name of the collection item
'We will loop through the collection FOR..EACH
'item the collection contians.
'vF will have a new value each loop
For Each vF In Request.Form
'Here you can see how we are writing to a
'recordset field with the data that is in the
'form collection item that has the same name
rs.Fields(vF) = Request.Form(vF) & ""
Next
'Now we are done adding data so we cal the update
'method to update the table
rs.Update
'now we close and clear the rs object
rs.Close
Set rs = Nothing
'This just tells you what record was added
Response.Write "Record added for User #" & Request.Form("fld_uid")
Else
'WE know the user is in here so we just update
'there record
'This code works the same as above but since we
'have already added this user we only need to
'update her data and not create a new record.
For Each vF In Request.Form
rs.Fields(vF) = Request.Form(vF) & ""
Next
rs.Update
rs.Close
Set rs = Nothing
Response.Write "Record updated for User #" & Request.Form("fld_uid")
End IF
'all done
End Sub
%>
Original Comments (3)
Recovered from Wayback Machine