Help.
I get this error every time I try to insert into my table.
OLEDB Error Code = 109
There are more columns in the INSERT statement than values specified in the
VALUES clause. The number of values in the VALUES clause must match the
number of columns specified in the INSERT statement.
Here the output of my sql statment.
Insert into dbo.cdm
(FAC, DPT, REV, FIM, F5, SIM, SimDescription, UP, HCPCS, PRICE, OpPrice,
PRO, SUPP, Supp2)
values
('B BRB 6005 600510023 * 10023 7 AV_WEST LAT_PSYCH OBSERVATION 0762 75000 NO
2 04/29/2001')
Here is the code that creates this insert statment.
<cffile action="READ" file="\\prmhtstr\dsweb\aaaweb2.txt" variable="aaaweb">
<!--- Get Column Names, Data Types from Form Field TableName and DSN(should
be an hidden form fields --->
<cfquery name="GetTableInfo"datasource="DSSWeb">
sp_columns CDM
</cfquery>
<cfquery name="Delete" datasource="DSSWeb">
DELETE
FROM dbo.cdm
</cfquery>
<cfset ColumnHeader = "">
<cfset Counter = 0>
<cfset ColumnData = "">
<cfset ColNumb =0>
<cfloop query="GETTableInfo">
<cfset ColumnHeader = ColumnHeader &", " & column_name>
</cfloop>
<cfset ColumnHeader = Replace(ColumnHeader,Left(ColumnHeader,2),"")>
<p>
<cfoutput>
<cfloop index="RowInfo" list="#aaaweb#" delimiters="#chr(10)#">
#asc(".")#<br>
#Replace(RowInfo,chr(46),"_","ALL")#<br>
#Replace(RowInfo,chr(9),"', '","ALL")#<br>
<cfset ColumnData = Replace(RowInfo,chr(9),"', '","ALL")>
<cfset ColumnData = Replace(RowInfo,chr(46),"_","ALL")>
Insert into dbo.cdm<br>
(#ColumnHeader#)<br>
values<br>
('#RTrim(ColumnData)#')<br>
<cfquery name="Insert" datasource="DSSWeb2" dbtype="OLEDB">
Insert Into dbo.CDM
(#ColumnHeader#)
Values
('#RTrim(ColumnData)#')</cfquery>
<cfset ColumnData = "">
<cfset Counter = 0>
<cfset ColNumb = 0>
<br>
</cfloop>
</cfoutput>
</p>
______________________________________________________________________
Why Share?
Dedicated Win 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=coldfusionc
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