|
Creating a Local DSN-less connection string.
1. To create your local DSN-less connection string,
you simply need to know what database driver to use, and the path
and filename of your database.
For example, if your database is MS Access 97 and called tutorial.mdb
and is on your C:
drive in a directory called database
which is in a directory called tutorial
which is in a directory called web_sites
then the path and filename would be:
c:web_sites/tutorial/database/tutorial.mdb
2. If using Access 97 then the correct JET driver would be 3.5
and thus the first part of the connection string would be:
.Provider=Microsoft.Jet.OLEDB.3.5;Data Source=
but I do not believe it will hurt to use the later Access 2000
driver (as the driver is backward compatible even if the two versions
of software aren't strictly compatible) which is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=
3. Now we need to add the second part of the string which we worked
out in step 1 above, giving the local DSN-less connection string
of:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:web_sites/tutorial/database/tutorial.mdb;
(note the semi-colon ; on the end of the string)
If this doesn't work (it should), an alternative is to use:
Provider=MSDASQL;Driver={Microsoft
Access Driver (*.mdb)};DBQ= (Here you put the information
you have just found in step 1)
to give:
Provider=MSDASQL;Driver={Microsoft
Access Driver (*.mdb)};DBQ=c:web_sites/tutorial/database/tutorial.mdb;
(all as one line, note the difference between the square brackets
{ } and the normal ( ) ones)
Now follow these instructions to enter the connection string into
UltraDev:
Defining a Local connection
<<Back
|