Wanted: Web Site Developers Opinions - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Wanted: Web Site Developers Opinions

  1. #11
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    ADO stands for activex database objects....it's a really simple object framework exposed through the ado com libraries.

    It consists of 3 main objects that you can create....

    Connection object > creates the actual connection to the database and can use the <objectname>.execute method to run a forward only recordset returning query or action statement. It also holds the errors collection to see what errors have been returned by the data provider (the oledb provider that is actually talking to the database for you...usually another dll provided by the database vendor).

    Command object > this takes a connection object or it can create it's own if you pass it a connection string. This can be used to run parameterized queries (so if you have a stored procedure that takes parameters this is the way to go really). You can run the <objectname>.execute method from here and it will give you your recordset.

    recordset object > again, can take a connection object or a query string. You can use this to create updatable recordsets, forward only ones, etc. If you want to create a disconnected recordset (can be handy if you are using the recordset in read only mode or for doing batch updating). Simply set the activeconnection property to nothing....and then if you need to reconnect it to the database for a batch update or something simply re-assign it a connection object.

    Ado is pretty simple to use and you can use it to deal with xml, text files, access, sql server, oracle, etc (even exchange and active directory). Pretty much any data service that offers a oledb provider.

    One of the best places to look for examples is probably just http://msdn.microsoft.com

    Again, if you need anything just gimme a shout...I have a ton o stuff on ado and so on.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  2. #12
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    It should be noted that the ADO style of connecting was mimicked by PHP when they created their connection objects for their database servers. It makes it very easy (once you know function names) for an ASP programmer to switch over to PHP and vice versa.

    Look at the similarities:
    ADO:
    set DBConn = Server.CreateObject("ADODB.Connection")
    DBConn.Open "Connection_String", "DB_UserName", "DB_Password"
    Query = "select column from table where othercolumn = 'someval'"
    set rs = DBConn.Execute(Query)

    PHP:
    $conn = mysql_connect("ServerName", "DB_UserName", "DB_Password");
    mysql_select_db("myDB", $conn);
    $Query = "select column from table where othercolumn = 'someval'";
    $rs = mysql_query($Query, $conn);

    They are basically identical with the exception that PHP's mysql_connect function doesn't have a connection string, just the server name (and port, optionally), whereas the ADO-style connection string includes the database name, and the various optional connection parameters. Fundamentally they are identical, and efficiency is the principal reason for it.

    If you're going to write on an ASP platform, you'd best use COM objects, otherwise you're really not getting anything in the way of efficiency.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  3. #13
    Gray Haired Old Fart aeallison's Avatar
    Join Date
    Jul 2002
    Location
    Buffalo, Missouri USA
    Posts
    888
    I guess I have more to learn than I thought, COM objects are these the COM+ objects used within windows 2k?

    Or are you refering to this? (posted by Juridian) Or are these one in the same?
    Is there a tutorial on this subject on AO?

    Command object > this takes a connection object or it can create it's own if you pass it a connection string. This can be used to run parameterized queries (so if you have a stored procedure that takes parameters this is the way to go really). You can run the <objectname>.execute method from here and it will give you your recordset.
    Please bare with me on this. This may all come to me in a flood later, I am extremely tired at the moment...
    I have a question; are you the bug, or the windshield?

  4. #14
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    Com is microsofts way of letting you create objects that can be in applications (active x exe's like word and excel or in libraries usually as .dll's). Com+ is com tweaked to better integrate your code with microsoft transaction server for distributed apps.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  5. #15
    Gray Haired Old Fart aeallison's Avatar
    Join Date
    Jul 2002
    Location
    Buffalo, Missouri USA
    Posts
    888
    Ok... here is my present dilema on this project. I am going to use a Silicon Graphics Indy workstation running IRIX as my data base server. My indy has no floppy or cd to install programs from. I need to connect this computer to my Win2k network, preferably my Win2k Pro workstation, and move/copy the files I need into the Indy through a LAN connection. So far, I can get the two computers to "see" one another but that is it. I cannot seem to transfer any files between them. What am I doing wrong, or what do I need to implement/install, on the Win2k box, or on the Indy, so I can install the database(MySQL) onto my Indy?

    One step at a time, once I accomplish this feat, I will be well on my way putting my webserver on-line and learning some real cool stuff.
    I have a question; are you the bug, or the windshield?

Posting Permissions

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