Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
jsabarese #1
my own database / CFOUTPUT works... now to add data viaCFML!
i'm a promoter for a concert venue. i'm responsible for maintaining an accurate
calendar of upcoming concerts, so my first real-world CFML trail is for this
application . i'm very excited to get it going!
i have created my DSN, ODBC connection, uploaded everything to my server, and
much to my surprise, my cfquery / cfoutput is displaying the information from
my simple MS Access database perfectly... just the way i wanted it! (a db which
i made w/ familar Excel format, imported .csv data, and wha-la, i had my .mdb!
i had no idea it was this easy... i'd have been here long ago!)
but, now for the true test... the purpose of this web application is so that i
can add data to the mdb via an "administrative login" w/ CFML so that every
time a new concert is booked, i can log into my admin section, enter the new
data into the appropriate fields corresponding to my db, and the new concert
info will be automatically displayed by ColdFusion for the appropriate people
to view.
if the cfoutput was this easy, i can't imagine that adding to the .mdb via
CFML could possibly be much more difficult.
i achieved success w/ the cfoutput via the art gallery tutorial in the
ColdFusion MX Developer Edition tutorial. but, i can't find any other tutorials
for learning how to input data into the .mdb. can someone please point me in
the right direction on my local drive if it exists in the MX 7 edition? if not,
what about an online tutorial, or some type of free resource where i can learn
this simple task for boosting productivity?
thank you!!
woo-hoo! coldfusion rocks!
jsabarese Guest
-
Help Needed : Flash/ASP database works in Firefox butnot IE!
Hi fellow flash wielders, I am currently building this guestbook in Flash 2004, and using ASP to talk to an Access database. Everything works... -
Import Data from flat-database to relational-database
Before I start I need some tips and pleas excuse my bad english. I have two databases, one is flat and one is a relational database. example ... -
NEWBIE HELP Import Data from flat-database to relational-database
I want to import Data from a simple Database, which contains all Information in one big record into a relational Database and split up the big... -
Can't seem to add to access database online, offline works fine
I developed an asp.net store with vb.net offline and everything works fine. The user is prompted to log in when they try to add to shopping cart... -
importing works database into excel
Please help, I have my addresses and phone numbers in a works database it is a wbd file and when I try to import them in 'import external data' I... -
doug777 #2
Re: my own database / CFOUTPUT works... now to add data via CFML!
Get yourself a copy of 'Teach Yourself SQL in 10 Minutes' by Ben Forta
published by Sams.
It's not really ColdFusion you need to learn for inputting data into
your database; it's SQL.
Doug
doug777 Guest
-
dspent #3
Re: my own database / CFOUTPUT works... now to add datavia CFML!
another great book that I used when I first started with ColdFusion was
Macromedia Training from the Source for Coldfusion MX..... It is a thin
paperback workbook, that guides you through all the basic of ColdFusion without
any of the complicated nonsense that sometimes turns people off when learning
something new.
Here's a few links for you:
[url]http://www.amazon.com/exec/obidos/ASIN/0672325675/qid=1109196006/sr=2-1/ref=pd_b[/url]
bs_b_2_1/103-8579693-6723027
dspent Guest
-
jsabarese #4
Re: my own database / CFOUTPUT works... now to add datavia CFML!
thank you!
okay, i will definitely look into that... for now, i've just been doing trial
and error... w/ emphasis on the error... could you tell me what i need to
change here to make this work?
<CFinsert DATASOURCE="cbshows">
tablename DATE SHOW ARTIST_WEBSITE ALL_AGES TIX_ADVANC TIX_DOS SUPPORT
SUPPORT_WEBSITE SUPPORT_2 SPRT_2_WEB
AGENT AGENT_CONTACT PUBLICIST PUB_CONTACT LABEL LABEL_WEB LABEL_CONT
LABEL_EMAIL MANAGEMENT
MGMNT_CONT MGMNT_PHON MGMNT_EMAIL
</CFinsert>
or
<CFquery DATASOURCE="cbshows">
DATE SHOW ARTIST_WEBSITE ALL_AGES TIX_ADVANC TIX_DOS SUPPORT
SUPPORT_WEBSITE SUPPORT_2 SPRT_2_WEB
AGENT AGENT_CONTACT PUBLICIST PUB_CONTACT LABEL LABEL_WEB LABEL_CONT
LABEL_EMAIL MANAGEMENT
MGMNT_CONT MGMNT_PHON MGMNT_EMAIL
</CFquery>
neither work. the latter (if i recall correctly) tells me i'm missing the
tablename syntax (all the caps w/ underscores are my table names) the
datasource ref is correct though-- cbshows is the datasource name.
this will get me going if someone can help w/ that part please
jsabarese Guest
-
dspent #5
Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML
The problem is that you have not specified your attributes correctly...and it
looks like you don't have the fieldnames or the values specified either.....
Use this as a guide: (for a cfinsert tag)
<cfinsert
datasource="cbshows"
tablename="NAME OF TABLE TO INSERT DATA INTO"
formfields="NAMES OF FIELDS SEPARATED BY COMMAS"This is also the same as: (For CFQUERY)>
<cfquery name="qInsertValues" datasource="cbshows">
INSERT INTO tablename to insert into (LIST OF FIELDS TO BE INSERTED SEPARATE
BY COMMAS)
VALUES (LIST OF VALUES FOR EACH FIELD SEPARATE BY COMMAS)
</cfquery>
For example I have a query that inserts article ratings into a table called
RATINGS for the knowledgebase app I'm building:
The query looks like this:
<cfquery name="qCreateRating" datasource="kbank">
INSERT INTO dbo.Ratings (ArticleID, RateHistory, LastRatedBy, RatingGiven)
VALUES (#qCreateArticle.ArticleID#, #RateHistory#, '#LastRatedBy#',
#RatingGiven#)
</cfquery>
Also head on over to [url]http://tutorial1.easycfm.com/[/url]
Hope that helps....
-Jones
dspent Guest
-
jsabarese #6
Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML
Jones,
Thank you!!! this is very helpful.
While we're on the subject, can you help me to decide if / when i would want to use
the tags <cfinsert> versus <cfquery>?
thanks again!
jsabarese Guest
-
dspent #7
Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML
ummmmm....
not sure I follow you...could you post the code that's "not working"... That would help.
dspent Guest
-
jsabarese #8
Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML
all of my troubles were solved when i used DreamWeaver to insert the recordset
query for me. i simply switched from "Common" to "Application" view, and used
the Insert Record Wizard. it did add more code than simply SQL, but it's helped
me to better understand some more CFML as well. i was very happy when i finally
discovered how easy it is!
jsabarese Guest
-
genmud #9
Re: my 1st ODBC / CFOUTPUT works... now to add data viaCFML
Yea... I based my BlueFish code library for coldfusion off the macromedia code
snippets in dreamweaver... Unfortunatly there is no dreamweaver for linux, so I
either run it in vmware, or use a native editor(which I much prefer), so i just
made snippets of code for that :) hehe i am so smart
genmud Guest



Reply With Quote

