ASP Database Connection 2.2 Custom Dialogue by Keith Collison, September 2000 kcollison@erols.com http://www.keithcollison.com Hope this proves useful to ASP developers out there. Please send me any errors, suggestions, or comments. Please let me know of any alterations you make. This is copyrighted work, but of course you are welcome to alter it to suit your individual needs. Installation: - Place all files into your \Extensions\TagDefs\Custom folder. - Right-click on your toolbar and select "Customize". After selecting which toolbar you wish to add it to, select "Add Custom Button". Select "Display a custom dialogue." In the field marked "Dialogue File" find the file you just copied. This is the only field required, though you are welcome to assign it an image, caption, or button hint to your liking. EXPERT CUSTOMIZATION: If you routinely use the same password, account, or DSN for your code, you might save yourself some key strokes by making them the default values of the dialogue. Open aspdatabase.vtm with any text editor (including Homesite) and hunt for the tag you wish to have a default value for. The "value" attribute is what designates what is automatically displayed, exactly like the traditional INPUT tag of HTML. You can conceivably do this for any field in the dialogue. Future Plans: Instead of using Homesite's dialogue mark-up language, I think this would be better suited for a VTOM Script. By using ScriptX, I could create a web-page that generates the code. By doing so, I could provide on-the-spot data results. Thanks to Nate Weiss for this idea, which he uses on his function browser VTOM. Alternatively, I could use the ability to embed ActiveX controls within Custom dialogues. Though, not being a Visual Basic programmer, this would take a bit of learning. Amazingly, I have yet to see a custom dialogue use this feature, I would be interested in seeing it happen. Carl Mc Dade: Keith has built a fantastic tool here. I will continue to build on it and fine tune. carl_mcdade@hotmail.com 2.2 Release Notes Modified by: Carl Mc Dade (carl_mcdade@hotmail.com) Connection objects changed to include DSNless connections for Access, Excel and Text Driver. A bug where if the user does not enter a data command object was fixed. Added cmdTypeUnknown to adovbs constants. So if no object is entered the cmdTypeunknown is used. A choice of declaring adovbs constants within the page or using the adovbs.inc is given. A little nicer icon for the toolbar. Created a "lite" version out of the original for those that want just the connection capabilities. See ConnDatabase.vtm Changed help files to external to allow HTML and Script tags to be used. This made it possible to add in code examples to the help. 2.1 Release Notes Changed the CursorType property of the Recordset object to "adOpenStatic" as the default, instead of "adOpenDynamic," which causes errors with most providers. 2.0 Release Notes Added support for OUTPUT paramters on stored procedures. Declared and defined each variable used by dialogue, of particular use to those using option explicit. Added space for another stored procedure parameter for a total of 5 Better formatted output code. Allowed use of column numbers for drop-down menu, and allowed designation of which fields to use. Added support for File DSNs in connection object. Added ability to include ADOVBS constants and ASP script deliminators. 1.2 Release Notes Used the ADO's GetRows method to pass Recordset into array Added a brief help section. Added a display option of "Drop Down Field" Eliminated the dataRec.movenext statement when looping through the fields collection. Added options to the Display Table dialogue, including table header background color and use of tag. --