473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can i update image?

How can i update picture based on id i submitted
Expand|Select|Wrap|Line Numbers
  1. <%Option Explicit%>
  2. <!-- #include file="../../includes/dbconn.asp"-->
  3. <HTML>
  4. <BODY>
  5.  
  6. <HTML>
  7. <BODY>
  8. <%
  9. dim Upload,File,sql,recid,Count,myconn,rs
  10. recid=request.Form("recid")
  11. Set Upload = Server.CreateObject("Persits.Upload.1")
  12. set myconn= Server.CreateObject("adodb.connection")
  13. set rs= Server.CreateObject("adodb.recordset")
  14. Upload.Save("c:\upload")
  15. myconn.open dbConn
  16. sqlstr="select * from product where"&recid
  17. rs.open sqlstr, myconn, adOpenKeyset, adLockOptimistic
  18. File.Delete
  19. rs.AddNew
  20. set File=Upload.Files("myfile")
  21. File.delete
  22. If Not File Is Nothing Then
  23. rs("pic").Value = File.Binary
  24. rs.Update
  25. end if
  26. rs.close
  27. myconn.close
  28.  
  29. %>
  30. </BODY>
  31. </HTML>
Thanks.
Mar 15 '08 #1
1 1405
jhardman
3,406 Expert 2GB
What do you mean? Your question is very unclear.

Jared
Mar 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tinius | last post by:
I am trying to update a field of type IMAGE. I am able to do this by deleting the record and then INSERTing a new record as shown below in the commented section. But I really want to do this...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
19
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
3
by: eholz1 | last post by:
Hello PHP programmers. I had a brilliant idea on one of my pages that selects some data from my mysql database. I first set the page up to display some info and an image, just one item, with a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.