Full Version: Reading HTML from Access in Access
UtterAccess Forums > Microsoft® Access > Access Forms
ghubbell
A Q!
I've been searching for a couple of days for this - can't find a thing. crazy.gif
magine I'm storing entire webpages source HTML in a memo field in an Access Db. It's input through a nifty API call, so all that side is 100%. Now I want to see the results without moving the HTML 'string' out of Access: say, on an Access form via a control (Probably ActiveX).
Although I could send the HTML string out (save it as a local file), then ask the native Web Browser control to read that file locally, I can't seem to find a way with it or any other for that matter, to read directly from tabled data. I really want to keep it all within Access for security reasons, so no loose files kicking about.
Anyone heard or seen such a control? Anyone with VB and ActiveX authoring experience who'd like to 'whip one up' for me?
Thanks in advance,
Gord
oh, p.s. "Please help!" ohyeah.gif
danishani
Hi Gord,

Try this out to export from an Access database to htm. Export a table or a stored query.

CODE

im sSQL As String
Dim sFileType As String
Dim sDestPath As String
Dim sExt As String
Dim sTableQuery As String
sFileType = "HTML Export;"
sExt = "htm"
sDestPath = "C:\Temp\"
sTableQuery = "tHTML"
sSQL = "SELECT * INTO [" & sFileType & _
"DATABASE=" & sDestPath & "].[FileName" & _
sExt & "] " & "FROM [" & sTableQuery & "]"
DB.Execute sSQL, dbFailOnError


I hope this is useful to you.

Daniel

Edited by: danishani on 09.17.04.
ghubbell
Hi Daniel,
Dank U - ja, I have similar code, but the problem still exists: I really do not want to remove the HTML string from the table only to read it. It is almost essential that the HTML remains inside the Db, and is read from there.
Gord o!
danishani
Hi Gord,
raag gedaan, after re-reading your question, I see what you want to achieve.
Shall do some search... hope I find something for ya.
Cheers,
Daniel
danishani
Gord,
hooked up something for ya, at least I do hope u are looking for something like this or simular...
Take a look at this article.
HTH
Daniel
ghubbell
Thanks Daniel,

I'll look it over some more but I think all this one is doing is HTML'ing (converting to HTML) Access data by the external program, not just reading raw HTML code stored as a string in Access. I will however contact Herr Schmidt to ask if he knows, or if he can create a somewhat similar solution.

Thanks again Daniel,

Gord o!
danishani
Gord,
ame accross a demo of Lebans, it seems to do what you are after, with some little adjustments.
Hope its more like it...
Daniel
ghubbell
Perfect Daniel - Dank U !
I'm only beginning to get a grip on the API calls and while I was heading this direction, Messrs. Lebans and Ashish have come through @ 100%.
Special thanks to you for the excellent detective work! acclaim.gif
Thanks again Daniel,
Gord o!
danishani
Glad to help u Gord frown.gif
aniel
nikh
Hi,

I've been following this thread with interest, and this is just what i am looking for too

Thanks very much!

Nik
Edited by: nikh on Tue Oct 19 4:52:46 EDT 2004.
danishani
Welcome to Utter Access Forums!!! frown.gif
Glad to help you out as well, and great to have you as a member in here.
Hope you like it as much as I do... wink.gif
Cheers,
Daniel
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.