Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My SQLPREPARE is erroring out!
Message
From
26/02/2002 12:23:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
My SQLPREPARE is erroring out!
Miscellaneous
Thread ID:
00625241
Message ID:
00625241
Views:
47
I have a VFP 6.0 application that runs as a front end against an Oracle database. I am getting an error message when running the following SQLPREPARE line:

**************************
SQLPREPARE (nSQLConnection, ;
"INSERT into mpd_laue_primary ;
(item_no, mold_no, mold_pos, operation_code, trace_id, ;
create_date, create_time, display_seq, inspector_id, ;
disposition_code, read_alpha, read_beta, read_gamma, ;
read_delta, orientation_actual);
VALUES ;
('"+pnItemNo+"', ?pcMoldNo, ?pcMoldPos, ?lcPriOperationCode, ;
?lcMold, trunc(sysdate), to_char(sysdate, 'HH24:MI:SS'), ;
?lnPriDispSeq, ?lnInspectorIDPrimary, ?pcDispCode, ;
?lnAlpha, ?lnBeta, ?lnGamma, ?lnDelta, ?lcMatch)")
nReturn = SQLEXEC (nSqlConnection)
**************************

The error message I'm getting is the following:

**************************
Error #: 36
Message: Command contains unrecognized phrase/keyword.
**************************

I know the problem is with ORIENTATION_ACTUAL (which is a char field) because when I replace that field name with another CHAR field in the table (see query below), my SQLPREPARE and SQLEXEC go through with no problems what-so-ever:

Good Query:

**************************
SQLPREPARE (nSQLConnection, ;
"INSERT into mpd_laue_primary ;
(item_no, mold_no, mold_pos, operation_code, trace_id, ;
create_date, create_time, display_seq, inspector_id, ;
disposition_code, read_alpha, read_beta, read_gamma, ;
read_delta, comments);
VALUES ;
('"+pnItemNo+"', ?pcMoldNo, ?pcMoldPos, ?lcPriOperationCode, ;
?lcMold, trunc(sysdate), to_char(sysdate, 'HH24:MI:SS'), ;
?lnPriDispSeq, ?lnInspectorIDPrimary, ?pcDispCode, ;
?lnAlpha, ?lnBeta, ?lnGamma, ?lnDelta, ?lcMatch)")
nReturn = SQLEXEC (nSqlConnection)
**************************

The only thing I can think of is that field name, "orientation_actual" is too long for Fox to handle. But there are other fields in the database (such as "dispositon_code") that are almost as long and Fox has no problems.

I am baffled by this one. Any ideas and/or suggestions would be greatly appreciated!

Thanks,

Joe
Next
Reply
Map
View

Click here to load this message in the networking platform