View Full Version : how to add new data to my database using coldfusion?

09-18-2002, 10:40 AM
i would like to know the code/s to extract data to the webpage from the database(microsoft access) using coldfusion... and how to add new contact and store it in my database using coldfusion...


09-20-2002, 07:35 AM
Get the basics of CF here http://hotwired.lycos.com/webmonkey/99/03/index2a.html
http://www.macromedia.com/support/coldfusion/documentation.html ("Getting Started Building Macromedia ColdFusion MX Applications")
http://www.coldfusiontutorials.com (if you like this site then you may want to install this :) (http://www.thefab.net/topics/computing/co19_asf_recorder.htm)

basically you have two main parts, the query which pulls out/or inserts data form the database. Then you have the output which outputs it to the webpage. so to pull something out of the database you would do something like

<CFQUERY NAME="getNames" DATASOURCE="yourDatasource">
SELECT name ( _what you want to select)
FROM namesTable (_where you want to select it from)


<h1>the names in the nameTable are below:</h1>


^ what every you put in between those <cfoutput> tags will keep outputting depending on how many results (names) are returned from the database (one for each result)

good luck.

09-20-2002, 09:28 AM
thanks a lot... I'll try to use it... The ones in brackets r the definition?


09-20-2002, 10:20 AM
If you are talking about these bracket bits here:

( _what you want to select)

yes that is the definition, everything else is the actual code I'm not sure where you are at but if you are new to SQL (SQL is the part that talks to the database "SELECT...FROM..." ) the bit that goes inside <cfquery> then you'll have to learn a bit of that too if you want to interact with databases using Coldfusion.


if you have any questions post back :thumbsup:

09-21-2002, 05:30 AM
I'm currently doing a project on SMS...
I did the programs... but i'm not sure whether i did them correctly... and i'm not sure where should i slot the codes in the programs...

I tried to view my programs with the Internet Explorer... But not very successful... when i clicked on the "submit" button... The page showed

"HTTP Error 405
405 Method Not Allowed

The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.

Please contact the server's administrator if this problem persists."

Is it because of my server or my programs? And i have no idea how to set the MIME... Do i need to set the MIME even if i'm not doing WAP?

I'm currently using Window NT option pack for my server...

09-21-2002, 07:48 AM
wait a minute, does the server you are using have coldfusion installed? becuase to run coldfusion pages you need to have the coldfusion application server installed and running.

go to


and try.. Is that what you where trying to do? it seems to be working, just had a few wee errors..

edited files > http://www.orchid.f2o.org/edited.zip

09-23-2002, 04:44 AM
thanks, mat...


Where can i download the cold fusion program?

I can see my own work through yr link but not through my own...

09-23-2002, 08:46 AM
http://www.macromedia.com/downloads/ :o

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum