ASP Free Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherASP Free Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 27th, 2004, 11:31 AM
dnjapro dnjapro is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 40 dnjapro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
How to write with my fields input from the form

here is my asp upload form code. When hard coded with the variables it works fine:

<%
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = True
count = upload.savevirtual ("/data/download/")
'Upload.Save "D:\download"
%>
Files:<BR>
<%
For Each File in Upload.Files
Response.Write File.Name & " = " & File.Path & " (" & File.Size & ")KB<BR>"

Next
%>
<P>
Administrator Document Upload Information:<BR>
<%
For Each Item in Upload.Form
Response.Write Item.Name & " = " & Item.Value & "<BR>"
Next
%>
<%
dim rs, strSQL2
' Session("UsergroupID") = Upload.Form("docupload")
' displayForm
strSQL2 = "INSERT INTO tblCONTENT_Links (LinkID, ContentOwner_UserGroupID, ContentGrouping, LinkHeaderOrder, LinkDescription, LinkName, LinkURL, LinkHeader, LinkHeaderCategory, LinkRefSite, Active, Archive, UpdatedDate, UpdatedBy, PasswordProtected, CommonLibrary) values ( 141, 7,'public', 3,'Test','Test.pdf', 'data\download\test.pdf', 0 , 28 , 'www.skyclimber.com', -1 , 0 , '8/27/2004' , 0, 0, -1)"

set rs = conn.Execute(strSQL2)
Session("docupload") = true
%>

However when I try to insert my form fields that it should be passing i get this error message:

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

Here is what my form looks like:

<form method="POST" enctype="multipart/form-data" name="docupload" action="uploaddocVtest2.asp">
<div align="center">
<center>
<table border="0" style="border-collapse: collapse" bordercolor="#111111" width="74%" id="AutoNumber1">
<tr>
<td width="100%" colspan="2" bgcolor="#3b447b"><b><font face="Arial" color="#FFFFFF">Sky Climber
Document Upload</font></b></td>
</tr>
<tr>

<td width="25%"><b><font face="Arial">Document Name</font></b></td>
<td width="50%"><font face="Arial"><b>
<input type="text" name="DocumentName" size="40"></b></font></td>
</tr>
<tr>

<td width="25%"><b><font face="Arial">Document Title</font></b></td>
<td width="50%"><font face="Arial"><b>
<input type="text" name="DocumentTitle" size="40"></b></font></td>
</tr>
<tr>
<td width="25%">
<b><font face="Arial">Document Category:</font></b></td>
<td width="50%">
<select size="1" name="Category">
<option selected value="1">Operations Instructions</option>
<option value="2">Parts List</option>
<option value="3">Marketing Information</option>
</select>
</td>
</tr>
<tr>
<td width="25%"><b><font face="Arial">Upload file</font></b></td>
<td width="50%"><font face="Arial"><b>
<input type="file" name="Document" size="40"></b></font></td>
</tr>
<tr>
<td width="100%" colspan="2"><font face="Arial"><b>
<input type="submit" value="Submit" name="Request"></b></font></td>
</tr>
</table>
</center>
</div>
</form>

what i need help with is how to get this to work:

strSQL2 = "INSERT INTO tblCONTENT_Links (LinkID, ContentOwner_UserGroupID, ContentGrouping, LinkHeaderOrder, LinkDescription, LinkName, LinkURL, LinkHeader, LinkHeaderCategory, LinkRefSite, Active, Archive, UpdatedDate, UpdatedBy, PasswordProtected, CommonLibrary) values ( 141, 7,'public', '" & Category & "' ,'" & DocumentName & ','" & DocumentTitle & ', '" & Document & ', 0 , 28 , 'www.skyclimber.com', -1 , 0 , #8/27/2004# , 0 , 0, -1)"

Reply With Quote
  #2  
Old August 27th, 2004, 11:38 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,764 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 6 h 8 m 20 sec
Reputation Power: 452
You should post this question in the proper forum area.
ASP Free Lounge is just for chit chat, not programming.

Reply With Quote
  #3  
Old August 27th, 2004, 11:42 AM
dnjapro dnjapro is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 40 dnjapro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Yeah

Quote:
Originally Posted by Memnoch
You should post this question in the proper forum area.
ASP Free Lounge is just for chit chat, not programming.
Respect to you to man.

thanks for the heads up.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherASP Free Lounge > How to write with my fields input from the form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT