Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error creating .DBF Table thru CF

Status
Not open for further replies.

ketankshah

IS-IT--Management
Jan 11, 2001
121
IN
I am getting following ODBC error while creating a .DBF table.

The error is
********************
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC dBase Driver] Syntax error in field definition.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (14:1) to (14:41).

Date/Time: 04/09/01 13:15:45
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Remote Address: 192.168.0.3
********************

The code I have written is
<cfquery name=&quot;dbf&quot; datasource=&quot;dbfs_cf&quot;>
create table test (id N(5,0), name c(50))
</cfquery>

Where 'dbfs_cf' is a ODBC DSN and is being verified successfully thru CF Administrator.

What should be the error ?

Please help.

Ketan
 
I manage to create the table but can't create a numeric field. Was able to create the char as well as date field. What datatype should be used to create a numeric field ?


The code is

<cfquery name=&quot;dbf&quot; datasource=&quot;dbfs_cf&quot;>
create table test (id Numeric(5,0), name c(50), startdate date)
</cfquery>


 
Hey ketankshah,

I've used &quot;short&quot; and &quot;double&quot; successfully in the past but your database may use a different syntax.

Let me know if it works,
GJ
 
I managed to sort out the problem. I used long instead of numeric and it worked.

Ketan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top