Do you have a sequence generator to create a primary key for "Course"?
If so:

INSERT INTO Courses (CourseID,Content)
VALUES (seq_courseid.nextval, '#attributes.content#')

In SQL Server if you have an autonumber ID field:

INSERT INTO Courses (Content)
VALUES ('#attributes.content#')

I believe MySQL would be the same as SQL Server. They have an Autonumber
function I think.

Greg Luce
954-763-4504
ICQ: 14078322

-----Original Message-----
From: Matthew Hood [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 01, 2001 2:44 PM
To: CF-Talk
Subject: Oracle/MSSQL/MySQL

I am a newbie when it comes to writing scripts (not Cold Fusion code but

the native script code for a DB server) and I would like to see an 
example of a script that will insert a large black of text (more then 
255 char.) into a field called Content in a table called Courses in a 
database called Mainsource.

Can someone give me some examples? One for Oracle, one for MSSQL and one

for MySQL? Thanks everyone!

Matt


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to