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

ODBC Updates

Status
Not open for further replies.

benjoyner

Programmer
Aug 7, 2003
11
0
0
US
I'm using VFP 7.0 to access a Sybase SQL Anywhere 8.0.2 database via ODBC (remote views). I have to use an sql insert command to add records. But when using either an update statement on a button click, or by modifying data
in a grid, the update does not occur? The view is set to update all. Any clues?
 
Add code to call AERROR() to see if a SQL error is occuring. It could be as simple as a syntax error or data type mismatch:
Code:
FUNCTION  GetSqlError()    && SQL Error code/text from AERROR()
private aErrArray     && Error message array for AERROR()
dimension aErrArray(10)
aErrArray[1] = -1
aErrArray[2] = 'Unrecognized Error'
=AERROR(aErrArray)
return STR(aErrArray[1],5) + " - " + aErrArray[2]
ENDFUNC



Mike Krausnick
Dublin, California
 
Thanks. I'll take any offers for assistance. I'll
plug in the script and test it over the next few days
as I'm out of town.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top