If TrackID is an autonumber then you can not insert into it...(to my
knowledge)..that would defeat the purpose.
Just insert the track name and it will assign it an ID for you. :)


-----Original Message-----
From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 20, 2001 5:54 PM
To: SQL
Subject: INSERT problem


I am running the following query and getting a syntax
error or access violation error when I do.  It is
being run from a ColdFusion template, but also will
give the same error from the SQL Query Analyzer.

INSERT INTO dbo.CDsTrack {TitleID,TrackName}
VALUES  {157,'This is a track'}

I have filled in the values where a variable would
otherwise be.  The CDsTrack table is linked by a
foriegn key (TitleID) to the CDsTitle table.  The
CDsTrack table also has another column, the TrackID
column that is an autonumbered primary key.  If I
enter the information in to the database manually it
works fine, and entering information in to the other
tables from a query is not a problem either, just
inserting information in to the CDsTrack table.

=====
Bernd VanSkiver
[EMAIL PROTECTED]
ColdFusion Developer
ICQ UIN: 916324
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to