How can i update picture based on id i submitted -
<%Option Explicit%>
-
<!-- #include file="../../includes/dbconn.asp"-->
-
<HTML>
-
<BODY>
-
-
<HTML>
-
<BODY>
-
<%
-
dim Upload,File,sql,recid,Count,myconn,rs
-
recid=request.Form("recid")
-
Set Upload = Server.CreateObject("Persits.Upload.1")
-
set myconn= Server.CreateObject("adodb.connection")
-
set rs= Server.CreateObject("adodb.recordset")
-
Upload.Save("c:\upload")
-
myconn.open dbConn
-
sqlstr="select * from product where"&recid
-
rs.open sqlstr, myconn, adOpenKeyset, adLockOptimistic
-
File.Delete
-
rs.AddNew
-
set File=Upload.Files("myfile")
-
File.delete
-
If Not File Is Nothing Then
-
rs("pic").Value = File.Binary
-
rs.Update
-
end if
-
rs.close
-
myconn.close
-
-
%>
-
</BODY>
-
</HTML>
Thanks.
1 1405
What do you mean? Your question is very unclear.
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
by: Neo Geshel |
last post by:
This works:
<form>
<asp:TextBox id="name" />
<%= name.ClientID %>
</form>
But this DOES NOT work:
<form>
|
by: Neo Geshel |
last post by:
This works:
<form>
<asp:TextBox id="name" />
<%= name.ClientID %>
</form>
But this DOES NOT work:
<form>
|
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...
|
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...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
|
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,...
| |