However
I have been given a load of ASP files that query a database only all the querying is done with FP's 'webot' stuff.
Is there some way of converting or deciphering this stuff...Im on a mac so i dont have front page to view the SQL statements
Example:
<%
Dim objConn, objRS, strSQL, strDSN
' a string to hold the dataset name, user id and password
strDSN="DSN=xxx;uid=yyy;pwd=zzz"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strDSN
strSQL ="SELECT count(*) FROM summarytbl"
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF
Response.Write objRS(0) & "<br>"
objRS = Nothing
objConn.Close
objConn = Nothing
%>
Im trying to re-design some pages that were done in frontpage and the page is over 150K and I'm sure most of it is due to the bloated webot code.
Here is just a very small snippet of the code:
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside
tag="BODY"
local_preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="center"><font color="#000000">End of Database Results region.</font></td></tr></table>"
preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="_fpclass/fpdbrgn2.inc"-->
Stuff like the above is repeated countless times throughout the page and I was hoping to rewrite is using ASP. I dont have access to frontpage so its just a bit of knightymare to edit.
The pages use some ASP but the guy that built the Queries just used Frontpage as he did'nt know how with ASP.
That snippet of code is really small compared to the other stuff, of course if you try to modify the webot stuff Frontpage throws a fit and mauls the code even more.
Well in order to use SQL with ASP, you must first know SQL. ASP is built using objects. To use the database object, you must first connect to it, open it and then get the object to execute the SQL code.
In my example, I tried to show that you can just pass the SQL code in a string and ask ASP to execute that code on the database.
The code that you posted later contains no SQL code. It seems to be formatting a table. There is no quick solution, to write ASP pages against a database you need to understand HTML, SQL and ASP.
In the US Barnes and Nobles have lots a good books aimed at the novice which could get you started.
Exctly my point! I know HTML by hand and have also run SQL statements using access but know nothing about ASP.
My problem is'nt with any of that. My problem is that FP has a wizard for connecting to a database and running SQL only it wraps it all up in <webot> tags.
The code that I pasted was the shortest piece of code i could find - it marks the end of a databse querie and am well aware that it doesnt contain a lot of SQL statements.
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
The thing I'm struggling with is trying to figure out what the <webot> stuff is doing. i.e whats "u-dbrgn2="_fpclass/fpdbrgn2.inc"
I can't really just delete <webot> stuff as the pages will not work. (its run with a server using Front Page Extensions.
I used it to learn the syntax and object structure, then you can take off from there.
But it sure beats trying to learn it from scratch.
And Dreamweaver doesn't use proprietary tags in your code.
Sticky