Results 1 to 21 of 21

Thread: SQL in HTML without ASP

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    16

    SQL in HTML without ASP

    hi,
    i want to ask if it's possible to send data to an html doc to another html doc and execute an SQL query with the data received from the sender html page.

    i made an ADO connection and executed a query in my html page. I must rebuid the query with the sent data from first page. But i dont want to use ASP. is there something like Request.Querystring in html?

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: SQL in HTML without ASP

    Originally posted by alperaydin
    hi,
    i want to ask if it's possible to send data to an html doc to another html doc and execute an SQL query with the data received from the sender html page.

    i made an ADO connection and executed a query in my html page. I must rebuid the query with the sent data from first page. But i dont want to use ASP. is there something like Request.Querystring in html?
    You cant do that just with HTML, you will need some sort of scripting language for database connectivity. E.g ASP, PHP and few others.

    HTML in itself is static and you will be able to generate dynamic content which you seem to be trying to do.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: SQL in HTML without ASP

    Originally posted by alperaydin
    hi,
    i want to ask if it's possible to send data to an html doc to another html doc and execute an SQL query with the data received from the sender html page.

    i made an ADO connection and executed a query in my html page. I must rebuid the query with the sent data from first page. But i dont want to use ASP. is there something like Request.Querystring in html?
    1. The question is somewhat redundant, since (as xplained) HTML is static. You cannot "send data to anhtml doc to another html doc" You must use server side scripting.

    2. More importantly, why, and what are you trying to accomplish?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    16

    thanks all

    thank you for your replies
    i wanted to make an html page to serve a database table with some parameters defined by the client. And i didn't want to use ASP, in order not to install IIS or PWS. (finally i installed)
    But i still wonder if i can do something like that:
    putting some option objects on the page and binding a sub defined in <SCRIPT> to their onclick events. Each time an option is clicked, onclick event will call the CreateList sub. And in the sub the parameters of the query will be determined by the options.

    Is that just a dream?
    thanks all

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: thanks all

    Originally posted by alperaydin

    Is that just a dream?


    YYYYYYYYYyyyyyyyyyyyyyyyyyyyyyyeeeeeeppp!!!

  6. #6
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Javascript ????

    Try looking into examples using javascript.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Javascript ????

    Originally posted by johnweidauer
    Try looking into examples using javascript.
    Since when has client side scripting worked with databases?



  8. #8
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Client Side / DB

    Well, I have written stuff using Javascript that allowed you to instantiate ActiveX objects that existed on the client machine. Not the ADO Control, but other things, thought maybe you could do this as well. If its SQL or something, if the server allowed anyone to connect to the db, then i thought it might be a realistic idea, but maybe not.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Aah, ActiveX. But that'd just add as an extra overhead headache for him/her, wouldn't it? I'm sure there's an easier way to accomplish whatever he/she's trying to do.

    Besides, I personally am paranoid about running ActiveX controls on my machine nowadays. :paranoid:

  10. #10
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    ActiveX Javascript

    Overhead yes, threatening, no.

    If you think of it, you would be using an Active X created By Micro$oft that is already running in multiple locations on your machine. It would make the connection to the DB slow.

    If HTML is the only option, meaning unable to run the web server on IIS, then maybe go with some free stuff like PHP, or ChiliSoft or something. Dunno, just a thought.

  11. #11
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: ActiveX Javascript

    Originally posted by johnweidauer
    If HTML is the only option, meaning unable to run the web server on IIS, then maybe go with some free stuff like PHP, or ChiliSoft or something. Dunno, just a thought.
    Even PHP and ChiliSoft still require a webserver..... Be it IIS or Apache or NetBSD, you still need a webserver to run serverside programming.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    webserver

    true, figuring his requirement for DB Connectivity via HTML, i thought maybe IIS was not an option, thus ChiliSoft or PHP, free.

    alperaydin, what webserver are you running, also, Request.QueryString, works in ASP only.

  13. #13
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Apparently, he does have PWS or IIS, but just doesn't want to use it. That's the part that confuses me... but hey, he must be human.

  14. #14
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by johnweidauer
    true, figuring his requirement for DB Connectivity via HTML, i thought maybe IIS was not an option, thus ChiliSoft or PHP, free.

    alperaydin, what webserver are you running, also, Request.QueryString, works in ASP only.
    Maybe I don't get it, but to run PHP, one would still need IIS....
    Unless you run Apache.... or NetBSD.... point being that it requires somekind of websrver... IIS or otherwise. I get the feeling that this is being developed for something internal, and doens't have the cababilities to set up IIS.
    Personally, ActiveX is a bad way to go... 1) Not all browsers support it. 2) There is some current litigation going on regarding the ability to run objects within the browser.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  15. #15
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Web Server?

    I have thrown out a couple of ideas. Trying to offer ideas since all of the information needed to provide a solution has not been given is all.


  16. #16
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: ActiveX Javascript

    Mandhak i dont think its paranoia, ActiveX control which running of a html page is just not safe. It has as much the same power as an .exe. Even client side VBScript is pretty powerful and i have seen people using that to read/modify registry settings though i think that exploits has been fixed. Even IE wanrns you before downloading ActiveX,that indicates something !

    But for say a intranet application it would be useful to use ActiveX to make some parts of an application accessible via web browser.

    johnweidauer: what the writing in the tea shirt ! Is it the blue screen of death ?
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  17. #17
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    wow...

    Ok, so this has turned into a discussion.

    1) I would not recommend running ActiveX objects in web environments unless you are running a service that needs to be powered by something a little more robust than ASP, or you are on an Intranet and the above applies.

    2) Instantiating the ADODB ActiveX from javascript doesnt install any software, it calls an existing/registered DLL on Windows machines - client side, given it exists.

    3) A web server is needed, which one being used in this discussion is unknown. For a better answer, please provide the web server being used.

    4) However, if you would like to show database tables, you can use Front Page Server Extensions, if supported by the web server, and create HTML pages that connect to the data using the Front Page "BOTS". This would require #3 to be answered.

  18. #18
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    So use XML.

  19. #19
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    XML True dat

    I neglected XML, probably cause my office is cold and my fingers hurt after a lot of typing

    however, that is a good idea as well

  20. #20
    Addicted Member
    Join Date
    Sep 2002
    Location
    Durham, NC, US
    Posts
    218

    JScript != JavaScript

    I wanted to jump up and down and yell and remind you that JScript is not JavaScript, and that JavaScript can't call ActiveX objects. JScript can. JScript is proprietary and closed, as a result, it is supported by a single browser, and that browser has the worst support for things like CSS.
    Travis, Kung Foo Journeyman

    Web Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.5 Guide and Reference
    Perl: Documentation, Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    OSS: Mozilla, MySQL (Manual)

  21. #21
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    your right

    my mistake...it has been a while.

    I had used Javascript to control ActiveX object on the web page, not instantiate the object.

    sorry for the confusion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width