Home > SQL Development > Database connection and forms

Database connection and forms



<i><b>Originally posted by : Jen (jennifer.jacobs@inet.com)</b></i><br />I hope this isn't a completely ignorant question, but I am having a problem with database connections and forms. On my first asp page I have a form that has two dropdown lists from the same database - the responses to which feed the form on the next page, and so on. I am getting an "unspecified error" where the drop down lists should appear. If I am accessing the database only once, but creating two different drop down lists then I am assuming I don't need to create an ADODB connection each time. I can create it once and use it all throughout the page. Also, I was assuming that I could create the same connection on each subsequent form. Do I have to create a separate ADODB connection each time I hit the database and give each connection a different name, e.g. conna for the first drop down and connb for the second drop down and connc for the 3rd drop down on the 2nd asp page. Also, where is the correct place to close a connection when using a form? Sorry if this is a stupid question. <br /><br />

    
Guest


<i><b>Originally posted by : Christy</b></i><br />You just need to open a connection to the database once. Close the connection as soon as you don't need to access the database anymore.<br /><br />Christy<br /><br />------------<br />Jen at 2/19/2002 9:34:56 AM<br /><br />I hope this isn't a completely ignorant question, but I am having a problem with database connections and forms. On my first asp page I have a form that has two dropdown lists from the same database - the responses to which feed the form on the next page, and so on. I am getting an "unspecified error" where the drop down lists should appear. If I am accessing the database only once, but creating two different drop down lists then I am assuming I don't need to create an ADODB connection each time. I can create it once and use it all throughout the page. Also, I was assuming that I could create the same connection on each subsequent form. Do I have to create a separate ADODB connection each time I hit the database and give each connection a different name, e.g. conna for the first drop down and connb for the second drop down and connc for the 3rd drop down on the 2nd asp page. Also, where is the correct place to close a connection when using a form? Sorry if this is a stupid question. <br /><br />

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved