|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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)" |
|
#2
|
||||
|
||||
|
You should post this question in the proper forum area.
ASP Free Lounge is just for chit chat, not programming. |
|
#3
|
|||
|
|||
|
Yeah
Quote:
thanks for the heads up. |
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > How to write with my fields input from the form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|