|
|
|
|
|
| | |
|
Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Problem with adding new record |
From: |
Shawn |
Date: |
12/14/1999 12:14:16 PM |
IP: |
206.98.143.200 |
I am able to add new records to a access database but I must have all the fields filled out otherwise I get an error message. This is how I have the code:
<%
Set rs = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\CATL0S25\databases$\IntranetQC\cpenhr\cccpen_acs.mdb"
Session.timeout = 3
Set Conn=rs
conn.open(DSN)
sql = "SELECT * FROM Employee;"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
rs.AddNew
rs("EmployeeCode") = Request("EmployeeCodeNew")
rs("FirstName") = Request("FirstNameNew")
rs("LastName") = Request("LastNameNew")
rs("Email") = Request("EmailNew")
rs("Extension") = Request("ExtensionNew")
rs("DepartmentID") = Request("DepartmentID")
rs("SupervisorID") = Request("SupervisorID")
rs("JobTitle") = Request("JobTitleNew")
rs("LocationID") = Request("LocationID")
rs("HireDate") = Request("HireDateNew")
rs("PersonalInfo") = Request("PersonalINfoNew")
rs("Picture") = Request("PictureNew")
rs("Exempt") = Request("Exempt")
rs("Status") = Request("Status")
rs("New") = Request("New")
rs.update
rs.close
set rs=nothing
%>
|
Follow Up - Re: Problem with adding new record - Jack Michaelson 12/15/1999 5:49:52 AM
Follow Up - Re: Problem with adding new record - kandan 12/16/1999 5:08:04 AM
|
|

|
|
|
|
|
|
|
|
|
|