Link to home
Start Free TrialLog in
Avatar of Roy_
Roy_Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Upload Script not uploading information

ok i will put 2 posts of code from 2 different sheets.
I have a problem where the code i have written isn't writing the information onto the database.
(the database has read and write permission to everyone.)
<%
Dim adoCon          'Holds the Database Connection Object
Dim rsAddComments   'Holds the recordset for the new record to be added
Dim strSQL          'Holds the SQL query to query the database
 
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("******.mdb")
 
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblComments.Drawings_Number, tblComments.Drawing_Title FROM tblComments;"
 
rsAddComments.CursorType = 2
rsAddComments.LockType = 3
rsAddComments.Open strSQL, adoCon
 
rsAddComments.AddNew
 
rsAddComments.Fields("Drawings_Number") = Request.Form("Drawings_Number")
rsAddComments.Fields("Drawing_Title") = Request.Form("Drawing_Title")
 
rsAddComments.Update
rsAddComments.Close
Set rsAddComments = Nothing
Set adoCon = Nothing
Response.Redirect "dwgreg.asp"
%>

Open in new window

Avatar of Roy_
Roy_
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

ok and this is my form code:
<html>
<head>
<title>Drawing Information</title>
</head>
<body bgcolor="white" text="black">
<!-- Begin form code -->
	 <form action="add_to_register.asp" method="post" enctype="multipart/form-data" name="form">
     Drawing Title: 
      <img src="../../***************************/spacer.gif" width="63" height="6" alt="">
      <label>
      <input type="text" name="Drawings_Number" maxlength="50">
      </label>
      <br>
      Drawings Number:<img src="../../***********************/spacer.gif" width="37" height="9" alt="">
     <input type="text" name="Drawing_Title" maxlength="50">
     <input type="submit" name="Submit" value="Submit">
 </form>
<!-- End form code -->
</body>
</html>

Open in new window

Avatar of Roy_

ASKER

(a bit more information)
it doesn't come up with an error message, just enters blank data.

Any ideas?
TIA
-R
ASKER CERTIFIED SOLUTION
Avatar of sybe
sybe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial