473,414 Members | 1,720 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,414 software developers and data experts.

Insert HTML table structure in sql table

Soniad
66
Hello,

I want a complete table structure assign to a variable and then insert this table structure in one of column of sql table.
the problem i am facing is vbscript is not interpreting html tags as string, how to escape this tags and make vbscript to detect as string .


Regards,
"D"
Feb 3 '09 #1
3 7016
semomaniz
210 Expert 100+
Please post your code
Feb 4 '09 #2
jhardman
3,406 Expert 2GB
@semomaniz
agreed. As a general rule you could try to put the code within a <textarea></textarea>, then asp should be able to handle it fine, but without seeing your code there is no way to see if that would work for you.

Jared
Feb 4 '09 #3
Soniad
66
Hello,

Thanks for ur concern and reply , i got the solution , and working ,
I put table structure in a variable , then in my sql insert query i replaced single quotes in that variable with double single quotes , the problem was sequel injection .

here's the code :

Expand|Select|Wrap|Line Numbers
  1.                                 StrMsg=""
  2.                                 StrMsg=StrMsg&"<table border='0' width='90%' style='border: 1 solid #800000'>"
  3.                                 StrMsg=StrMsg&"<tr>"
  4.                                 StrMsg=StrMsg&"<td width='100%'><img border='0' src='http://www.microlifeline.net/images/registrationl.gif' width='750'  height='98'></td>"
  5.                                 StrMsg=StrMsg&"</tr>"
  6.                                 StrMsg=StrMsg&"<tr>"
  7.                                 StrMsg=StrMsg&"<td width='100%' ><P style='margin-left: 8'><font face='Verdana' size=2>"
  8.                                 StrMsg=StrMsg&" Hello "& strFirstName &",</font></td>"
  9.                                 StrMsg=StrMsg&"</tr>"
  10.                                 StrMsg=StrMsg&"<tr>"
  11.                                 StrMsg=StrMsg&" <td width='100%' ><P style='margin-left: 8'><font face='Verdana' size='2'>"&locateAdd
  12.                                 StrMsg=StrMsg&"</font></td> "
  13.                                 StrMsg=StrMsg&"</tr>"
  14.                                 StrMsg=StrMsg&"<tr>"
  15.                                 StrMsg=StrMsg&"<td width='100%'><P style='margin-left: 8'><font face='Verdana' size='2'>"
  16.                                 StrMsg=StrMsg&" MicroLifeLine Site Admin "
  17.                                 StrMsg=StrMsg&"</font></td>"
  18.                                 StrMsg=StrMsg&"</tr>"
  19.  
  20.                                 StrMsg=replace(StrMsg,"'","''")                                
  21.  
  22.                                 sqlemail = "insert  into Emails_To_Send (mailFrom,mailTo,mailCc,mailBcc,Subject,Message,dtdate,Mail_Sent,Attempts,mailPriority,App_ID,mailFormat)  values('admin@microlifeline.net','"&strEmailAddress&"','"&strEmailAddress&"','"&strEmailAddress&"','"&StrAction&"','"&StrMsg&"',getdate(),0,0,'normal',NULL,'html')"                         
Regards,
"D"
Feb 5 '09 #4

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

Similar topics

2
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their...
7
by: Alex Vorobiev | last post by:
hi there, i am using sql server 7. below is the stored procedure that is giving me grief. its purpose it two-fold, depending on how it is called: either to return a pageset (based on page...
6
by: Karen Middleton | last post by:
In MS Access I can do in one SQL statement a update if exists else a insert. Assuming my source staging table is called - SOURCE and my target table is called - DEST and both of them have the...
7
by: John A. | last post by:
Hello all! I've got a big bunch of pages using tables for layout. Eventually I'll get them set up with more modernized code, but in the meantime I'd like to slip in a little quick holiday...
9
by: Martin | last post by:
Hello, I'm new with triggers and I can not find any good example on how to do the following: I have two tables WO and PM with the following fields: WO.WONUM, VARCHAR(10) WO.PMNUM,...
10
by: Peter Kirk | last post by:
Hi there can someone please help me with creating dynamic content in a table? For example, see the below javascript and html - why is a new row not created in the table when I click the button?...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
7
by: bbasberg | last post by:
Hello, I thought I would do a "sanity check" by asking the experts how to do the following: I need to process external data (it will be in an Access DB table and will be updated daily) into a...
1
oranoos3000
by: oranoos3000 | last post by:
hi i have an error with enter record to table in database(mysql) structure of my table is as follow - phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host:...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.