Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TABLEUPDATE Data type mismatch error
Message
 
To
06/05/2003 19:41:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00785593
Message ID:
00785640
Views:
11
>Check all field names, to see if one of them is a reserved VFP keyword. For instance, I once had this sort of problem with a field called "Value".

Thanks for reply...

As you can see in snippet I have UNIQUE. But the problem is sporadic. My suspecion is the error is a write to the PHDbase Index (CM_Desc field). I cannot change the field name until the SQL version is finished whereby it will be named xUnique as will all other bad names.

I just seperated out the CM_Desc field from the insert and do a replace on it after the insert.

In other words.

INSERT
TABLEUPDATE()
REPLACE CM_Desc
TABLEUPDATE()

If the error moves then it is PHDBase and I will change error trap to first check to see if Description is written and if it is ignore. The records look good so far inspite of error.



>Check all field names, to see if one of them is a reserved VFP keyword. For instance, I once had this sort of problem with a field called "Value".
>
>>I am receiving the error "Data type mismatch" on a TABLEUPDATE. What I know to be true.
>>
>>A). VFP 7.0 SP1 to VFP table attached to DBC. PHDBASE index on target table and on field CM_Desc.
>>
>>1). No Stored procedure on table so that is not cause of problem.
>>
>>2). Optimistic Row bufferening is absolotuly set.
>>
>>3). The data types for all values are correct. The reason I know this is that I am inserting from memvars. All Memvars are being written to errorlog. Terminal Services does not allow clip board cut & paste to local window I cannot prove this here but I have checked on several error records.
>>
>>4). Researched archives for some other problem but cannot find any possibility.
>>
>>The code is
>>
>>
>>nPrevTableBuffering = CURSORGETPROP('BUFFERING', 'SP_CM')
>>CURSORSETPROP('BUFFERING', 3, 'SP_CM')
>>
>>.....
>>
>>INSERT INTO SP_CM (        ;
>>      CM_Code,             ;
>>      CM_Desc,             ;
>>      CM_Hosp,             ;
>>      UNIQUE               ;
>>   ) VALUES (              ;
>>      cCode,               ;
>>      cCM_Desc,            ;
>>      cProvider,           ;
>>      cNewId               ;
>>   )
>>
>>lWrite = .T.
>>
>>.....
>>
>>IF !TABLEUPDATE(2, .T., 'SP_CM', 'aErrorr')
>>*   ^errors here
>>
>>
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform