Insert An Image
I have a website I am working on that I did not create. It is ASP and SQL based. There is a content management system created using ASP and saving in the SQL server database. A user can enter a news article into a big text box/area, and choose to add an image. The text and image are stored in the database via ASP and pulled out to the website via ASP.
The image shows up in the website to the top left of the article. I need to make it so the user can enter an image where their cursor is in the paragraph (like a word document) and have it also show up there on the website. Any ideas?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Insert Image
i created a table and a field with blob datatype. now i want to insert an image into the mysql database.i tried through the insert command but i assume that is not the right way. I gave the path where the picture is stored. but it stores it on the database as a string.
Insert Image
i created a table and a field with blob datatype. now i want to insert an image into the mysql database. i tried through normal insert command adn realised i cannot do that way.. I want to store some picture in mysql and retrieve it on the web through asp i am unable to find out how to do it.
How To Insert An Image In The Database...
I m trying to set up a form so that a user can isert a gif or jpeg image into a table in the database. 1) Can you please show me how to create a table in the database so that it accepts the images 2) I need to know how to actually browse to an image in hard drive and then insert it in the table
Insert An Image In An RTF File
I'm using ASP to gernerate an RTF file as the result of a form. But, I need to have an image be at the top of the first page. I'm generating the RTF file from an example that I found on Microsoft.com using statements like below...
Insert Image From Database
I AM NOT ABLE TO DISPLAY IMAGES FROM ACCESS DATABASE JUST 11 BLACK IMAGE BOXES OF SIZE 400 X 250 Code: sql="SELECT [IMAGES] FROM ITEMS" rsAuthors.open sql, cnnNorthWind, 3, 3 %> <%Set rsAuthors = cnnNorthWind.Execute(sql) IF rsAuthors.EOF then 'No records found Response.End ELSE 'Display the contents DO WHILE NOT rsAuthors.EOF 'Response.BinaryWrite(rsAuthors("IMAGES")) %> <img src="image/<%=rsAuthors("IMAGES")%>" height="400" width="250"> <%rsAuthors.MOVENEXT LOOP END IF %>
Display An Image From Access, Stored As Location Name Not Actual Image.
I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database. Following is the code to list vehicles: ....
Open Image In 'Kodak Image Edit Control' With Web Browser
1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be shown better with 'Kodak Image Control'. 3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page. 4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the reason I don't get correct result). 5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control. 6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem? For better understanding of problem I'm pasting a following code which I've tried up till now...... .................................................. <%@ Language=VBScript %> <% OPTION EXPLICIT %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <SCRIPT LANGUAGE=javascript> <!-- function showpic() { var path; path = document.frmtif.path.value; alert(path); document.frmtif.ImgEdit1.Image =path; document.frmtif.ImgEdit1.Display; window.parent.self.open(path); } //--> </script> </HEAD> <BODY bgColor=#ffe4e1> <form name="frmtif"> The Image <P> <OBJECT id=ImgEdit1 style="WIDTH: 409px; HEIGHT: 218px" type="ImgEdit" align=left border=1 classid=clsid:6D940280-9F11-11CE-83FD-02608C3EC08A name=imgtif></OBJECT> <input type="hidden" name="path" value="..MFTDRCMF919685173-62.tif"> <input type="button" name="show" value="Show" onclick="showpic();"> </P> </form> </BODY> </HTML> ..................................................
Displaying Alternate Image When Image Source Not Found
I am creating a dynamic ASP VBScript page, which gets data from an Access database. In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database. I think what I am trying to get to is the following: If file exists (using URL from database to get location of image file) thendisplay image using the url from the database as the image source else display default image - hardcoded in program endif I have had a go and come up with the attached but I get an error with my if statement. <% Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If objFSO.FileExists (server.mappath("<%=(Recordset1.Fields.Item("ImageLocation").Value)%>")) Then <img src="<%=(Recordset1.Fields.Item("ImageLocation").Value)%>"> Else <img src="images/awaitingimage.jpg" width="243" height="239"> End If %> I get "The page cannot be displayed" with the following error: Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' /living_space_root/TMP5zdpv2l4js.asp, line 58, column 66 If objFSO.FileExists (server.mappath("<%=(Recordset1.Fields.Item("ImageLocation").Value) -----------------------------------------------------------------^
Displaying Alternate Image When Image Source Not Found
I am creating a dynamic ASP VBScript page, which gets data from an Access database. In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database. I think what I am trying to get to is the following: If file exists (using URL from database to get location of image file) then display image using the url from the database as the image source else display default image - hardcoded in program endif I have had a go and come up with the attached but I get an error with my if statement...
Image From Image Folder Into Byte Array?
I can convert an image that is retrieved from a FileUpload object into a byte array and insert it into the database.. When the user signs-up i wish tosimply insert into the Picture (DB Type = Image) field to an image i already have saved in my images folder? Anyone know of a way to do this? Tutorials, articles or advise??!
Show Image From SQL Image Field?
Here is my code. I'm using 2 pages. (Page 1) blob.asp <% set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_blob_STRING Recordset1.Source = "SELECT AboutPic FROM Elizabeth.GF_AboutUs" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% Response.contentType = "image/jpg" 'Recordset1.Fields("AboutPic") <---Tried both methods size = Recordset1.Fields("AboutPic").ActualSize blob = Recordset1.Fields("AboutPic").GetChunk(size) Response.binarywrite(blob) %> (Page 2 Show the Image) <% Dim urlString urlString = "?" & Request.QueryString %> <% Another rs to show other information as text from the same table %> <body> <img src="blob.asp<%=urlString%>" width="194" height="256"> </body>
<%=request.querystring("image")%> Image Won't Display
This worked fine for enlarging my images until i put it onto a secure server, anyone know how i can fix it ??? just comes up with the standard box with a red cross in it .. and the url when i click image properties says: http://url/images/<%=request.querystring( which is only part of the code)
Merge An Image Into Another Image
I'm looking for a simple way to merge an image into another image.What i have is a screenshot uploader, and i want to make it so that when they upload the SS, the script will automatically merge a small copyright type image onto the bottom right of the picture.
Insert In DB
I have a form which the user fills and submits.i have insert statement there. When i submit the form to itself ,the values get submitted and inserted in DB easily. <form method="post" action="Infoviewagentver212.asp" name="form"> Now when i want the user to hit submit and go to other page i change the above to: <form method="post" action="newpage.asp" name="form"> but here what happens is my values are not getting inserted in the DB?? How do i do this?
INSERT INTO
I'm using ASP + MS SQL. I wrote a simple insert into command but nothing is happening... it gave no error and no information is stored in the db. When I response.write my SQL, I got the following: Code: INSERT INTO [blog_entries](title,user,entry,date) VALUES('test','admin','test','Tuesday, December 25, 2007')
Insert Into
I am very new at this and ding this in context of a course. I am getting an error stating Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' Can you please look at this and tell me where I went wrong ? Code:
Insert Into A Db...
Our graphic designer has just finished redeveloping our website. On the site, we use SSL to secure the area where a user enters their personal information to order items from us. (we do not do many transactions - maybe 1 per day...) We are a log home mfg company so they would only order plan books, maybe a video etc... When the user clicks "Submit Order", we want to encrypt each data item (because of new legislation governing customer personal info etc...) and write a record to an access db. From here it will be imported into our Customer DB leads database... I do not use ASP but program in VB 6 and Access 2000. ASP looks similiar in many ways... Does someone have a good ASP script for encrypting data? And, if so, is it fairly strong encryption? Also, is there any trick to writing an "insert" SQL script in ASP or is it exactly the same as I would do in VB or Access? Maybe someone has an "insert" script handy they could pass along including the command to actually execute it?
Insert In SQL ASP
i have got a data base which contain more than one tables one for student one for teacher and one for books i make a fourm to read the input from the user Code:
Insert All At Once
Code: mySQL="INSERT INTO products (sku, youtube, description, details) VALUES ('" &pSku& "','" &pYoutube& "','" &pDescription& "','" & pDetails& "')" call updateDatabase(mySQL, rstemp, "insert1") that's shortly the way i'm inserting new records. using mysql and asp functions. The prob is that inserting only one record every time. if i got data for 3 records how can i make it at once to add 3 new records in some given order into the db
ADO Insert
What is the best way to see if a record has inserted correctly into the datase in ASP? Also, how to tell the user what the error is. I am inserting like this with the ADO command object: Dim sInsert, objCmd set objCmd = Server.CreateObject("ADODB.Command") sInsert = "sp_ADS_Insert_Driver_General_Data " on error resume next With objCmd .ActiveConnection = oConnEnergy .CommandText = sInsert .CommandType = adCmdStoredProc .Execute , , adExecuteNoRecords
DB Insert
Application X has three screens. The user captures information on screen one and then clicks a navigation button to go onto screen two.He does the same on screen three. At the bottom of screen three is a submit button. When this button is clicked the system does some calculations with the information that is supplied and then uploads all the info that was captured on the screens to the database. Should the data be uploaded to the database all on one go when the user clicks the submit button or should it be uploaded after each screen - ie when the user clicks the button on Screen 1 the data is uploaded to the database and then screen two is displayed.
INSERT INTO
I have a database in which I have to on a daily basis enter the information for that day.I would like to update this on a bi-hourly basis to prevent any possible data loss. Using INSERT INTO, I create a new table line. Using UPDATE, I get an error on the inital creation of the table line.I am really unsure how to check to see if that line exists or if there is an easier way around this.
SQL Insert Into
When the following code runs it produces no errors but doesn't give proper results: sql = "INSERT INTO TableName (Line1, Line2, Line3, Line4) VALUES ('" & lines(0) & "', '" & lines(1) & "', '" & lines(2) & "', '" & lines(3) & "')" Response.Write(sql) SET RS = Conn.Execute(sql) lines() contains nothing but strings and is never empty. The Response.Write(sql) shows the proper values going into the proper locations. However, only Lines(0) actually populates the table. Line2, Line3, and Line4 never receive any values despite the SQL showing the proper syntax.
Insert
i have this insert statement that is giving me trouble, the problem is with expiration_date field the error i'm getting is: Syntax error in date in query expression '##'.Code: SQL_Insert = "Insert INTO TableName(ColumnX, ColumnY, ColumnZ, ColumnZZ, ColumnXX, ColunmYY, Expiration_Date) values ('" & _ ColumnX& "', '" & ColumnY & "', '" & ColumnZ & "', '" & ColumnZZ & "', '" & ColumnXX& "', '" & ColunmYY & "', #" & Expiration_Date & "#)"
SQL Insert
I'm using a list in a form in which users can select up to three items. When they submit the form, they are of course being inserted into one field as comma delimited. I can split the data to display, but I was wondering if that data could be inserted to the table as its own record. So, instead of being inserted as one record with three comma delimited choices, I would like three records with one choice in each. Here is a sample of my code: conn.execute=("INSERT INTO Submitted_Information (PreferredGrade, PreferredSubject, Sponsor) Values (" &_ "'" & PreferredGrade + "', " &_ "'" & PreferredSubject + "', " &_ "'" & Sponsor + "')" ) conn.close %> Preferred Grade and Preferred subject can have up to three selections each.
Odd Insert Into MS SQL
I have a column call UserDate and it's properties are this : varchar(50) . I have a function which updates the column with todays date. for some reason, if I manualy give the value to be inserted a value of '10/10/2006' or use date() it inserts a value of 0 if I give a value of 4 to be inserted it works? I have been working on a project for 2 days and this is the last piece to get it to work, can anyone point out where I'm going wrong. P.S I have tried giving the colum a date format but unfotunately the format is american and I need it in english to compare with something else I'm working on.
Insert Into
how do I insert file.filename into the access database when i upload a file it saves to uploads folder see code that doesn't work below file.SaveAs("/johnny/Uploads/" insert into pics1 set rspic = '" & file.filename& "' where author = '" & session("variable") & "'")
SQL INSERT
I have some data I want to put into the database. My question is twofold. What is the best/most efficient way to do this? I've heard of the Execute method, but I can't seem to get it to work. Why won't it let me close the recordset object when I insert a record? Code: [vbs] sqlTxt = "INSERT INTO tablename VALUES ('ShopperID', '" & Date &"', '"& Cust_Name &"', '"& Cust_Password &"')" set rs = server.CreateObject("adodb.recordset") rs.Open sqlTxt,conn [/vbs] Whenever I use rs.Close, it tells me that the operation cant continue while the recordset is closed.
SQL Insert
I am getting syntax errors when trying to insert my form. This is what I am doing: INSERTSQL="INSERT INTO EPR_PTS_ISSUE_TRACKING (Issue_Type, Request, Issue_Title, Issue_Desc, Application, Status, Created_By, Date_Entered) " INSERTSQL=INSERTSQL & "VALUES (" INSERTSQL=INSERTSQL & "'" & Issue_Type & "', " INSERTSQL=INSERTSQL & "'" & RequestNum & "', " INSERTSQL=INSERTSQL & "'" & Issue_Title & "', " INSERTSQL=INSERTSQL & "'" & Issue_Desc & "', " INSERTSQL=INSERTSQL & "'" & txtApplication & "', " INSERTSQL=INSERTSQL & "1, " - The error is between this line INSERTSQL=INSERTSQL & "'" & Created_By & "', " - and this line. INSERTSQL=INSERTSQL & "sysdate,"') " set rs=cn.execute(INSERTSQL)
Get Last Insert?
How can i get the last inserted record in an ASP ACCESS combination? Code:
Insert Problem
I have a 2 asp pages for a registration form. The first one is where the user types the data, and the second one has a form that requests the data from the 1st one and then sends it to the database. Both are sending the data correctly (I've seen it on the error page) but it's not feeding the DB.
Insert Problem
Microsoft OLE DB Provider for SQL Server (0x80040E2F) Cannot insert the value NULL into column 'ContactID', table 'ka0506a.ka0506a.contacts'; column does not allow nulls. INSERT fails. /submitcontact.asp, line 15 What happened is i used to used MS Access and ContactID is an Autonmuber field, and now my connection is set to MS SQL so it's giving me this error, what's causing this error to happen and how can i change it ?
Insert ASP Code In JS
I have a problem. I have ASP code and Javascript code. Now, I want to access ASP code inside javascript code. Here is the ASP code:
INSERT INTO Problem
This is on my HTML page <td align=center> <textarea cols="85" rows="7" name=""Problem"></textarea> </td> User" enters information into this box. If they use either a quote or double quote, but SQL statement bombs. Is there a way quick way to fix this beforehand? Conn.execute ("INSERT INTO PROBLEMS (Problem) VALUES ('" & Problem & "')")
ASP Insert Process
Just like to know if I am correct and no problems in this scenario: I have page where the user clicks a button to save some information >> gets directed to page 2 where a value gets returned from a recordset and the form is inserted automatically upon loading with the value (sequential for the database table) >> the user then gets redirected to page 3 upon insertion into the database, if I use 'Select Top 1 ......' as a query to retrieve some information on this page am I sure that this is the correct record just inserted even if 2 or more people are saving at the same time?
Insert Statement
I have an asp page which runs an update into our mysql database. The only problem I have is that a user selects a customer from a dropdown (this is database fed), and I require the selected item to be loaded into the db. All I can get in the database is the first part of their name upto the first space ? i.e. if the selected item from the dropdown is A B Knowles, the database entry is 'A' cust = request.form("customername") I have tried adding ' " & cust & " ' for the insert statement What do I need to do to fix this minor glitch.
Using Multiple INSERT In An If Then End If
This is my code, for some reason, when I use this exact code it doesn't update my database, but if I use the next section of code it does. Anybody knows why that when I use two different "Insert" in If Then End If, it doesn't work? Oh and I did try the "If PID = 105 OR 151 Then" alone and it works well. Code:
Insert Data In My Db
I've been choosing to insert data ni my db using a recordset with methods AddNew and Update. I would like some advices to make my coding opractice better. For example: am I doing it right? Is there a better to do what I'm doing and so on...: Code: set rsExample = Server.CreateObject("ADODB.RecordSet") rsExample.Open "example", MyConn, adOpenStatic, adLockOptimistic, adCmdTable rsExample.AddNew rsExample("id")=id rsExample("firstName") = firstName rsExample("lastName") = firstName rsExample("subject") = subject rsExample("message") = message rsExample("new") = 1 rsExample("date") = now
Insert Into All Fields
is there a way to write a insert statment with out typing out all of my field names? i want to do an insert in every field but i don't want to have to write them all out.
Join Insert
How can i insert a data using a join statement insert into partmaster.p, execmaster.e(e.execno, e.model, e.battqty, p.partno, p.parttype, p.itemtype, p.stacklength, p.line, p.execno) values('1234567890', 'GBM', '2', '9876543210', 'AR', 'M', '29V', '2', '1234567890') i have a few input box for the user to enter. but as u can see that both tables has execno. it's for both tables to connect. that's why i want to check on how i can key in one input box insert into execno in two different tables
Insert Date
SQL_query = "insert into Activity_Status(UserID, TotalTime, Score, Activity_Name, Status) Values('" + Request.Form("username") +"'," + Request.Form("time") + "," + Request.Form("QuizScore") + ",'"+ Request.Form("QuizType") + "'," + "'" + Request.Form("status") + "')" How shld I insert a date to this statement?
(ChiliSoft) Insert
Current setup: Sun server running Solaris 9, Apache, Chilisoft ASP, MySQL I'm having problems inserting data into MySQL from an ASP vbscript insert page I am using Dreamweaver to create the forms for ease of use. When I try to insert a record via the table only the first field in the form is inserted into the database and any subsequent fields are ignored I tried creating a test table with just three fields (id (auto_increment), helptitle, helpinfo) The helptitle field is inserted fine and the record is assigned an ID but the subsequent helpinfo field is not inserted at all I then tried creating an insert page using ASP JavaScript and all the fields were correctly inserted
Insert Statement
i tried to insert data's to a table and its working ..but the only problem is when i click the button Submit(to add data)its adding 2 rows of data... 1 is the data's which i entered n the other 1 is a blank row of data...so when i log out n run the form again..error occured.. saying that confilcts in a primary key.. coz there is a blank rows in the table... Code:
Insert Values
Iam trying to insert values into my database, but i keep on getting this error, Code: Subscript out of range: '[number: 1]' I have tried to check my insert values but i can't pickup anything, can anyone assist me in this regard. Here is the portion of the code:
Looping Insert
I'm currently having some major problems with an insert form that I created Basically, if a large amount of information is being inserted into the database I get an error This seems to be a restriction imposed by the host What I would ideally like to be able to do is to grab so many characters from the textarea insert this into the database and loop this until everything has been inserted (the information would all need to be inserted into the same field of a record) I've never tried this before so would appreciate any advice/tips on how to go about doing this
Insert Into - Using Numerics
I have an Access database with Numeric fields. In my ASP code I'm trying to use a variable to enter those numbers, such as Insert into MyTable (Item, N1, N2) Values ('NewThing', v1, v2) I have set v1 and v2 previously with numeric values but they are not recognized. Do I need to wrap v1 and v2 in some sort of identifier, such as "#"?
|