Good coding advice.

Results 1 to 3 of 3

Thread: Good coding advice.

  1. #1
    Join Date
    Dec 1969

    Default Good coding advice.

    Further to gods post before I have a question.<BR><BR>I have a page that does an number of things one after the other, e.g. a select, insert and delete if necessary. I have always coded a page like so:<BR><BR>&#060;% Code1 %&#062;<BR>&#060;% Code2 %&#062;<BR>&#060;% Code3 %&#062;<BR>&#060;% Code4 %&#062;<BR><BR>Now inside each bit of code I open and close a connection for each bit of code, Would it be better (more efficient) to put all the code inside one set of delimeters? and only open 1 connection i.e.<BR><BR>&#060;% <BR>Code1<BR>Code2<BR>Code3<BR>Code4 <BR>%&#062;<BR><BR>Thanks if you can shed any light.<BR><BR>James

  2. #2
    Join Date
    Dec 1969

    Default RE: Good coding advice.

    Yeah, only open the connection once, do all the stuff, then close it at the end, reducing delimiting is also good (but not so you&#039;d notice)

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Would not make a diff IF

    you have connection pooling enabled...another connection for each code MAY be faster<BR><BR><BR><BR>as for the "delimiters" do not need it but having them will not make much of a diff either....<BR><BR><BR>As clear as mud?<BR>

Posting Permissions

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