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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string constant beginning not delimited HELP!!!

Status
Not open for further replies.

twospoons

IS-IT--Management
Jan 7, 2003
103
US
ok... i'm using CF5.0, Win2K, DB2/400 over ODBC with Client Access V5R1.

i keep getting this message:

ODBC Error Code = 37000 (Syntax error or access violation)
[IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQL0010 - String constant beginning '/simplic' not delimited.

I haven't been able to pinpoint what is causing the error. If I change the single quotes to double quotes for the delimiter then I get this message:

ODBC Error Code = S1000 (General error)
[IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQL0107 - "/simplicity/products/product_quantity_validate.cfm" too long. Maximum 30 characters.

WHAT IS THAT ALL ABOUT??? The field that I'm updating is 200 length alpha.

I have tested the SQL outside of Coldfusion using SQLThing with the exact same ODBC datasource.

I have used this same code with MySQL and with MSAccess without problems, and I thought I had it working fine here. It just started giving these errors and I can't figure out the cause.
 
here's the code i'm using:

<cfparam name="session.ip_address" default=""><cfparam name="session.page_name" default=""><cfparam name="session.date" default=""><cfparam name="session.time" default=""><!-- set session variables to client infor --> <cflock scope="session" timeout="5"> <cfif session.ip_address is ""> <cfset session.ip_address = cgi.remote_addr> </cfif> <cfset session.page_name = cgi.path_info> <cfset session.date = createodbcdate(now())> <cfset session.time = createodbctime(now())> </cflock><cfoutput> </cfoutput> <!-- get current counter for this page --> <cfquery name="get_header_counter" datasource="#application.ds#"> SELECT WCHCNT as count FROM WEBHCH WHERE WCHIPA = "#tostring(trim(session.ip_address))#" AND WCHPGE = "#tostring(trim(session.page_name))#" </cfquery><!-- if user has been to the site before --> <cfif get_header_counter.recordcount GREATER THAN 0> <!-- increment counter --> <cfloop query="get_header_counter"> <cfset form.this_counter = count + 1> </cfloop> <!-- update existing record in header file --> <cflock scope="application" timeout="30"> <cfquery name="update_header_counter" datasource="#application.ds#"> UPDATE WEBHCH SET WCHCNT = #form.this_counter# WHERE WCHIPA = '#trim(session.ip_address)#' AND WCHPGE = '#trim(session.page_name)#' </cfquery> </cflock> <!-- if user has not been to the site before --> <cfelse> <!-- initialize counter --> <cfset form.this_counter = 1> <!-- add new record to header file --> <cflock scope="application" timeout="30"> <cfquery name="add_header_counter" datasource="#application.ds#"> INSERT INTO WEBHCH (WCHIPA, WCHPGE, WCHCNT) VALUES ('#trim(session.ip_address)#', '#trim(session.page_name)#', #form.this_counter#) </cfquery> </cflock> </cfif><!-- update web page view counter detail file --> <cflock scope="application" timeout="30"> <cfquery name="update_detail_counter" datasource="#application.ds#"> INSERT INTO WEBHCD (WCDIPA, WCDPGE, WCDDAT, WCDTIM) VALUES ('#trim(session.ip_address)#', '#trim(session.page_name)#', #dateformat(session.date, 'yyyymmdd')#, #timeformat(session.time, 'HHmmss')#) </cfquery> </cflock>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top