Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP9sp2 / MySQL 5.1 - update failure
Message
From
26/04/2010 16:33:01
Steve Pugh
Davis Claim Services, Inc.
South Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
VFP9sp2 / MySQL 5.1 - update failure
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01462098
Message ID:
01462098
Views:
128
We have MySQL 5.1 running in production (on OS X) and development (on Windows 7). The VFP app picks up record updates from a 3rd party software and adds/updates records in the MySQL table. My code has been working flawlessly in production for 2 months however when I run the same code in development the add function works but the update fails (we actually got our cart before the horse and have only recently decided it prudent to set up a development environment-go figure). When I step thru the program and copy the SQL command to a text file I can execute the query directly on the server (via SQLyog) and it works.

This is the INSERT command which works in production and development.
fld_list = "SET "
fld_list = fld_list + "`Fileno`='" + m.FileNo +"', "
fld_list = fld_list + "`BillSCM`='" + ALLT(STR(m.Comm_Split,9,2)) +"' "
fld_list = fld_list + ";"
sqlcmd = "INSERT ignore into `database`.`table` "+fld_list
sqlok = SQLEXEC(MyDBconx,sqlcmd,'MyCursor',qResult)

The UPDATE command works in production but not in development.

fld_list = "SET "
fld_list = fld_list + "`ClaimStat`='" + m.Claimstat +"', "
fld_list = fld_list + "`ClaimStatField`='"+ m.ClaimStatFld +"', "
fld_list = fld_list + "`BillSCM`='" + ALLTRIM(STR(m.Comm_Split,9,2)) +"' "
fld_list = fld_list + " where TRIM(fileno) = '" + ALLTRIM(m.fileno)+"'"
* fld_list = fld_list + ";"
sqlcmd = "UPDATE `database`.`table` "+fld_list
sqlok = SQLEXEC(MyDBconx,sqlcmd,'MyCursor',qResult)

NOTE: I've tried adding/removing the semi-colon on the UPDATE with no difference in result.

Are there any obvious places to look into why this is failing (other than firewalls and permissions which have already been scoured)?

Kinda new to MySQL server. Are there logs I can review to determine exactly why it is failing?

Thanks in advance~
Steve
Next
Reply
Map
View

Click here to load this message in the networking platform