Oh man, I have not had enough coffee! ----- Original Message ----- From: "Bimal Shah" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, February 08, 2002 9:56 AM Subject: RE: Access to SQL Server
> INSERT INTO(TABLE NAME) VALUES...? > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 08 February 2002 16:53 > To: CF-Talk > Subject: Re: Access to SQL Server > > > Thanks for your help. I have another question. Normally this query work > s > (in Access): > > <cfquery name="insertinfo" datasource="test1"> > (FirstName, LastName, Email, Address, City, State, ZipCode, DOB, Phone, > QuestionOne, QuestionTwo, QuestionThree, QuestionFour, QuestionFive) > Values > ('#form.first#', '#form.last#', '#form.address#', '#form.city#', > '#form.state#', '#form.zip#', '#variables.dob#', '#variables.phone#', > '#form.cupsaday#', '#form.howoften#', '#form.typesofcoffee#', > '#form.percentprepared#', '#form.otherbrands#') > </cfquery> > > But trying to insert it into sql server I get this error: > Error Diagnostic Information > ODBC Error Code = 37000 (Syntax error or access violation) > > > [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax n > ear > 'FirstName'. > > > > The error occurred while processing an element with a general identifier > of > (CFQUERY), occupying document position (28:1) to (28:48). > > > Is the syntax alot different when inserting into sql server than Access? > > > > > > > > > ----- Original Message ----- > From: "Tyler Silcox" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Friday, February 08, 2002 8:46 AM > Subject: Re: Access to SQL Server > > > > set your primary key as an INT, then you have to set your Identity to Y > es > > (Not for Replication)...are you using Enterprise Manager or scripting? > > > > Tyler Silcox > > email | [EMAIL PROTECTED] > > > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Friday, February 08, 2002 10:35 AM > > Subject: Access to SQL Server > > > > > > In Access you can set the primary key to auto number - how do you do th > is > in > > SQL Server? I would assume that has something to do with this error th > at > I > > am getting: > > > > Error Diagnostic Information > > ODBC Error Code = 23000 (Integrity constraint violation) > > > > > > [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the > value > > NULL into column 'UserID', table 'SaraLee.dbo.ChockUsers'; column does > not > > allow nulls. INSERT fails. > > > > > > > > Thanks! > > > > > > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona 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

