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!

Record Validation rule is violated.

Status
Not open for further replies.

123FakeSt

IS-IT--Management
Aug 4, 2003
182
I have a vbs script trying to alter a boolean field in a FP 8.0 table.

At the line:
Code:
Set oRS = oConn.Execute("UPDATE cus SET cusacco = .T. WHERE cusky = """ & cusky & """
I get the above error. I know cusky is valid because i use it in another query, so it must be the dang boolean.

I am using Microsoft OLE DB Provided for Visual FoxPro from VBS script.

Thanks

The early bird gets the worm, but the second mouse gets the cheese.
 
It might be those triple quote marks. Try putting a messagebox in to debug:
Code:
strSQL = "UPDATE cus SET cusacco = .T. WHERE cusky = """ & cusky & """
msgBox strSQL
Set oRS = oConn.Execute(strSQL)
That'll show you what's being sent to the driver.

BTW - just noticed you've forgotten the final ) in your code.

Geoff Franklin
 
Yeah .. i always throw in the msgbox to troubleshoot that. The SQL is exactly as if i was in VFP 8.0 sans the error. And the closed paranthesis was a typo (didn't want to post the actual code for security reasons).

I'm going to try to modify a different field (non-boolean) tommorrow like the address. That will isolate whether the error is being created by a data type inconsistency or a permissions issue.

The whole validation rule thing makes me beleive that it is a VFP ODBC issue .. a discrepency between the way that the ODBC driver and the actual VFP database interepret the data type.

But as this is my first adventure into VFP i am expereincing many a blonde moment.

The early bird gets the worm, but the second mouse gets the cheese.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top