A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
How to setup DSN Less Connection in Dreamweaver MXThis tutorial will demonstrate the process of setting up a database connection in Macromedia Dreamweaver MX 2004. |
On Friday, August 26th 2005 at 10:08 AM By Nabeel Akhtar (View Profile) ![]() ![]() ![]() ![]() (Rated 5 with 9 votes) |
||
|
Click on the icon to the left to run the Video Tutorial (Flash Animation). Or you may download it in ZIP format by clicking here. To view this tutorial in Macromedia FlashPaper Format, click here (Opens in a new window...) This tutorial will demonstrate the process of setting up a database connection in Macromedia Dreamweaver MX 2004. The database that I will be using for this tutorial is an Access Database. I will use the DSN-Less approach to connect to the database since not all ISPs favour the DSN approach for setting up database connections. SETUP DATABASE: So before we dig in, lets setup our Access Database. I will create a database in C:\test\test.mdb. Here is how my database looks like: Notice that the "srno" field is assigned the primary key. The name of this table is "Table 1". Lets go ahead and add some data to this database. Now let's save the database and set Read permissions for the IUSR_xxx account. These permissions have to be set be START DREAMWEAVER: Let's open up Dreamweaver and go to File > New > Dynamic Page > ASP VBScript > Create. Once the file is created, save it under your webroot location. I have saved the file as "dmx_db.asp". Now the fun begins... Open the Databases panel (Window > Databases) Click the Plus (+) button on the panel and select Custom Connection String from the pop-up menu. The Custom Connection String dialog box appears. Complete the dialog box as follows: ![]() In the Connection name, type conn. This will be the name of your database connection (it could be anything you want) In the Connection string, type Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\test\test.mdb The DBQ sets the location of the database. Your location may vary. If you have assigned a password to the database then use Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\test\test.mdb; pwd=your_passwd Now click on the Test button to make sure that everything is going fine. ![]() If you see the above window, it means everything is going fine. However if you don't see the above window, you need to restart and follow the explained process. Now under the database tab you should be able to see the "conn" connection that you just created. Expand the tabs and you should be able to see the table and the column names that were previously created in the database. CONNECT DATABASE WITH A DYNAMIC DROP-DOWN LIST: Now that we have the database in place, we can now connect any of the HTML input fields to the database. To start this process, the first thing that we have to do is to create a Recordset. The Recordset will hold the values returned from a SQL Query and then the resulting fields can be used to populate a drop-down list. The Recordset will be defined in the Bindings Window (Window > Bindings). Click the + sign and choose Recordset (Query). A new window will pop-up. Fill in the details as shown below and click on OK: ![]() Once completed, you will see a Recordset entry in the Bindings window. Now it's time to create an input field and assign this recordset to our HTML field. Create a Form Region Click on the List/Menu to select it and then click on "Dynamic..." ![]() Fill in the details as shown below and save your work: TRY IT OUT Now open up your browser, and type in the URL to the page you just created. When the page comes up, the drop-down list will be populated with the names stored in the database. Thats all... and remeber, the possibilities are endless. You can customize your query and filter records based on your need. Happy programming. If you need to contact us, please visit http://www.nabeelakhtar.net/contact/ Nabeel Akhtar http://www.nabeelakhtar.net |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current CommentsThank-you for your time and effort... this has been one of the easiest and most straight forward tutorial I have seen. Unfortunately I am supposed to make a dynamic data web-based page for some friends at GeoCities... their server will not allow asp extensions... could you recommend another solution? Thanks in advance. Paul.
Paul,
You would have to use some type of server end language in order to make a dynamic page. I don't know what type of service does GeoCities offer but you can ask them if they support some other languages such as PHP.
--------------------------------------------------------
Nabeel Akhtar
http://www.nabeelakhtar.net
Online Live Support @ http://www.NabeelAkhtar.NET
Forums @ http://forum.NabeelAkhtar.NET
--------------------------------------------------------
THANKS SO MUCH!!!
Excellent tutorial and very easy to follow. Works perfectly in Dreamweaver but when I try to run the ASP code on my IIS Server I am getting an error:-
General error Unable to open registry key \\\'Temporary (volatile) Jet DSN for process 0x10b8 Thread 0x310 DBC 0x1688fec Jet\\\'
Do you have any idea why this might be?
Excellent tutorial, the best and easiest I've found. Keep up the good work!
i made da connection successfully but when i go to binding there is no sign of + appear i mean when i click Click the + sign no new window will pop-up.please help me
how do u set up the test server?
this was very useful. thnx
This tutorial is excellent. I am excited it worked.
But when u make selection from the list, it opens an error page, how do I stop that.
After setting up the connection, How do I setup my connection to enter records and save/update my database.
I created an .asp webpage using dreamweaver and MS Access DB.
But how can I get it to work with MySQL?
I created an .ASP using XML online news update to server side
good for you... but isn't that a tiny little bit off topic?
It seems like the site you manage within Dreamweaver needs to be set up as a PHP-MySQL site, and won't work with ASP due to the PHP integration of Dreamweaver.
By the way, I am talking about the database binding controls, you can select on in the database menu.
But please, tell me if I am wrong here, that I can actually use an ASP site to deal with MySQL (besides programming the whole thing in the script editor). I could realy use something like this. I don't want to get involved in learning PHP since I don't have to the time to learn another language or dialect. :-)
i am getting this error
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/test/dmx_db.asp, line 5
i am getting this error
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/test/dmx_db.asp, line 5
thank's for u're meaning info,,,,for me 'n other,,,go on
Yr tutorial is excellent. I could do everything in my Dreamweaver on localhost. I have created a DSN on my real website, using same .mdb file. Kindly guide how I use this .mdb file on my real website.
Yr tutorial is excellent. I could do everything in my Dreamweaver on localhost. I have created a DSN on my real website, using same .mdb file. Kindly guide how I use this .mdb file on my real website.
Related Tutorials
Related Source Code
ASP Job Search