Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IAnywhere ODBC
Message
 
To
15/02/2005 19:50:05
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
00985894
Message ID:
00987371
Views:
58
Hi James
I think I resolved the problem. I have been connecting with a datasource. When I changed this to a string the data updated without errors and when I closed the cursor, the data remained on the server...<s>

At last...

Thanks for all your help
>Hi Willie,
>
>Sounds like you are having fun <s>.
>
>Have you trided using sql pass-through? If that gives you the same result, you can turn on the odbc debuger to see what is going on.
>
>
>>Hi James
>>Ok more funny stuff!
>>
>>Up until now I was working on Server 2000
>>
>>I configured my notebook so I dont have to work through PC Anywhere. My notebook is running XP.
>>
>>When trying to open and modify I get the same results as previously except for when I create a new table and append to it. I then dont even need to set the buffer to 5. When I close the data remains. So what I did is to recreate a table that is givng me a problem and import the data into that table. I then deleted the old table and renamed the new table to the old table name and tried opening and modifying the data. All worked fine.
>>
>>So I try the same on my server box with windows 2000. No Luck!:(
>>
>>I also tried the SQLcommit stuff but that too did not resolve my problem.
>>
>>>Willie,
>>>
>>>OK the light just came on. I have an issue open with MS now on a similar problem. For some reason, the automatic commits are not working in Vfp9. Here is a couple of things to try.
>>>
>>>
>>>if tableupdate()
>>>  lnHndl = CURSORGETPROP("ConnectHandle")
>>>  ?sqlcommit(lnHndl)
>>>  * if that does not work try this
>>>   ?sqlexec(lnHndl,"commit")
>>>endif
>>>
>>>
>>>I had to change my framework to issue a begin tranasaction at the start of insert or update and a commit after to work around this problem for now. I have be very busy and have not had time to do the testing for MS that the want.
>>>
>>>>James
>>>>
>>>>Even more bizare stuff hapening his side.
>>>>
>>>>I have created a simple table with 3 fields. PKKEY (Integer, PK and autonumber), Name (Varchar 20) and Surname Varchar 20).
>>>>
>>>>In fox I create the view and browse and append 2-3 records. I can see it in ASA without tableupdate (buffering set to 3). I close the table the data dissapear in ASA.
>>>>
>>>>I repeat the process but this time set buffering to 5. and issue Tableupdate. Returns .T. Same thing data is on ASA side. I requery() and the new PKkey values as assigned by ASA apears. I close and the data is gone again on ASA.
>>>>
>>>>The only diference is the autonumberng on the PK field. I changed the Varchar to char but still the same.
>>>>
>>>>When running it with my application table and updating as you sugested the record is deleted on the view because of the force. It is however not updated on ASA side
>>>>
>>>>If I call tableupdate without the force I get the following error:
>>>>laerr[2] = Update conflict in cursur 'SETUP'.
>>>>
>>>>I really cannot understand this.
>>>>
>>>>Thanks for your help so far.
>>>>
>>>>>Willie,
>>>>>
>>>>>I would leave out the error array and see what happens.
>>>>>from the help file.
>>>>>
>>>>>cErrorArray
>>>>>
>>>>>
>>>>>Specifies the name of an array created when nRows = 2 and changes to a record cannot be committed. The array contains a single column containing the record numbers of the records for which changes could not be committed. If you include an array name, you must include either a table or cursor alias cTableAlias or a work area number nWorkArea.
>>>>>
>>>>>
>>>>>if not tableupdate(1,.t.,"setup")
>>>>>dimension laerr[1]
>>>>>?aerror(laerr)
>>>>>?laerr[2]
>>>>>endif
>>>>>
>>>>>I have not used views since vfp7 but I will play with this a little tonight and see what I can come up with.
>>>>>
>>>>>
>>>>>>James,
>>>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform