Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I can add data from asp page into database

    I write "upload file" page by asp and want to store information about file into database file that is written by microsoft access 2007.I test it.File is uploaded already but it's not save to database it's show error like this

    ".Technical Information (for support personnel)

    Error Type:
    ADODB.Recordset (0x800A0CB3)
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    /mywebproject/createfilesv.asp, line 22


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SIMBAR Enabled; SIMBAR={8E9E36DB-BE9E-427c-B503-C24DDC080BD7}; .NET CLR 2.0.50727; MEGAUPLOAD 1.0; InfoPath.2; MEGAUPLOAD 2.0)

    Page:
    POST 6409 bytes to /mywebproject/createfilesv.asp

    POST Data:
    error '80020009'
    Exception occurred.

    /iisHelp/common/500-100.asp, line 223"

    This's code in client side
    <html>
    <head>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <title>Upload File Page</title>
    </head>
    <body background="c:\inetpub\wwwroot\mywebproject\In_The_Shadow_Of_The_Stars%2C_Space_Art.jpg">
    <br><br><br><br><br><br><br><center><font face="DilleniaUPC" size="5"color=white><b><u>Upload file</u></b></font><br><br><br><table border=0><tr><td></td><td align="left">
    <form enctype="multipart/form-data" method="post" action="createfilesv.asp">
    <font face="DilleniaUPC" color=white size="4">Your Name:</b><input type=text size=40 name="fullname"><br><br>
    File:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="file" name="f1" size="40"><br><br>
    Description: <input type="text" name="description" size=40><br><br>
    <input type="submit" value="Upload" name="uploadbut"></font>
    </form></td><td></td></tr></table></center>
    </body>
    </html>

    This is code in sever side
    <%@ Language=VBScript %>
    <!-- #include file="upload.asp" -->
    <%
    Dim Uploader,File
    Set Uploader = New FileUploader
    Uploader.Upload()
    Response.Write "<b>Thank you for your upload " & Uploader.Form("fullname") & "</b><br>"
    If Uploader.Files.Count = 0 Then
    Response.Write "File(s) not uploaded."
    Else
    For Each File In Uploader.Files.Items
    File.SaveToDisk "C:\upload\"
    Response.Write "File Uploaded: " & File.FileName & "<br>"
    Response.Write "Size: " & File.FileSize & " bytes<br>"
    Response.Write "Type: " & File.ContentType & "<br><br>"
    Set ObjDB=Server.CreateObject("ADODB.Connection")
    ObjDB.Provider="Microsoft.Jet.OLEDB.4.0"
    ObjDB.Open "c:\inetpub\wwwroot\mywebproject\fileinfo.mdb"
    Set Rs=Server.CreateObject("ADODB.Recordset")
    SQL="Select * From FileInfo"
    Set ObjRS=ObjDB.Execute(SQL)
    ObjRS.Addnew
    ObjRS.Fields("UploadDate")= Now
    ObjRS.Fields("FileName")=File.FileName
    ObjRS.Fields("Description")=Request.Form("description")
    ObjRS.Update
    ObjRS.Close
    ObjDB.Close
    Set ObjRS=Nothing
    Set ObjDB=Nothing
    Next
    End If
    %>

    How to solve this I have to sent it next week.
    Last edited by davincith; 09-17-2007 at 02:17 PM.

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    DaVinciTh --

    You need to open your connection with the correct cursor types.

    Google:

    adUseClient

    and your error message:

    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #3
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How? Tell me the solution of the code

  • #4
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Did you Google what I told you to?

    It has the answers you are looking for.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •