how to use DSN-less connections in Ultradev (VBScript)
as described in basic understanding of database conections you might have to set up a DSN-less connection under some circumstances. how does the connection string look like to create a DSN less connection you have to select ADO (Connection String) from the connections dialog box and put in something like the following. DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\Myfolder\db\myDatabase.mdb or: PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=C:\Inetpub\wwwroot\Myfolder\db\myDatabase.mdb; USER ID=;PASSWORD=; (make sure that this is a single line) or similar strings depending on the server or database type you use (check with your ISP). the part that is green is simply the identification for the driver which is the same for e.g. any Access database. you should know if you need a password and if what it is if required. the blue part is the path from the server root to your actual database on the server. it varies but you should know the path anyway. how to find out the root of your domain the tricky part is the red one which is the real path to the server root. you might find some info on the help pages of your service provider. another way is to find this out by uploading a simple ASP file to the server which contains the following in the body tag of the HTML: <%= Server.MapPath("\") %> this will return the root of your domain. click here to download an ASP file that has this script included. just upload it to the server and access it via it's http:// address.( if it doesn't work then ASP is not running properly). in most cases you have to add your folder after that and then subfolders etc and finaly the database name. what to enter in Ultradev when finished you have to add this string into the "Runtime Connection " setting in Ultradev. for the "Design time" you can still use your local DSN. NOTE: changing the settings in the "Connections" panel will not update existing pages. click here to find out how to do this.
further note on ISP suggestions if you check out your service provider's (ISP) help pages for how to set up your connection in many cases the suggestion for the connection string will look like the following: "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\MyDomain\db\MyDatabase.mdb") this way you wouldn't have to find out the location of the server root beforehand, the Server.MapPath function returns it automatically. bigger ISPs might have more than one drive with servers. that way they don't have to tell each customer individually where his/her domain is located etc. also if you handcode ASP you could just as well type it in that way and spare yourself finding out the serverroot first. you can use this connection string in Ultradev as well but only by copying it into the source code. it seems to be less hassle to find out the server root because of the following distinct disadvantages: - you cannot test your connection - you loose the ability to work with the databindings panel - more dramatically: you would have to copy this into the code for each recordset you create |
|
you find more info about this e.g. at: |