Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2003, 07:51 PM
Authorized User
 
Join Date: Sep 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default can i enter html into access database?

Hi,

My question is that can i enter a link to a page like
<a href= "page.htm"> page </a> as a value into access database?



<%
  dim objConn
  Set objConn = server.CreateObject("ADODB.Connection")

  objConn.connectionstring = strConnect
  objConn.open

sqlquery = "INSERT INTO searchtable (search_results)
values ('<a href= "page.htm"> page </a>')
objconn.execute(sqlquery)
objconn.close
%>

and if i can, i dont know if the values should be in single quotes or double quotes. thanks.

 
Old September 11th, 2003, 03:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, it is possible to insert HTML in to a database; after all it is just a string.

However you are right one has to be very carefull with the quotes, but that is not only when inserting HTML. I have had problems myself when typing single quotes into the database. You probably have to escape the quotes before inserting, and possibly also upon retrieval.

Hope this helps!?

Jacob.
 
Old September 11th, 2003, 03:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

...ohhh.

I forgot to say that the quotes problem is more an issue of the construction of the sql string, than it is an issue of the actual insertion in the database.

Jacob.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel ALT+ENTER, Html equivalent? lizard8890 Excel VBA 1 October 16th, 2006 03:53 AM
html in Access Database anukagni Access 2 February 20th, 2006 01:22 AM
Enter date to database Calverstine Dreamweaver (all versions) 0 August 8th, 2005 09:45 AM
how to print html data from access database method Classic ASP Databases 2 March 11th, 2005 12:51 PM
password for enter in access giulio_santorini Access 1 August 21st, 2003 11:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.