Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug on CursorAdapter.UpdateType where i can report the b
Message
From
07/11/2002 09:37:21
 
 
To
07/11/2002 08:24:38
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italy
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00719735
Message ID:
00719771
Views:
17
Hi!

Strange... Despite UpdateType is 1 by default, did you try also CursorSETPROP("UpdateType", 1, 0)?

>I have the first experience with vfp 8.0 Beta and CursorAdapter.
>
>I've tried to update a remote Table on SQL SERVER using a Cursor Adapter Object.
>The code below is the code that i used.
>
>I have some problem with UPDATETYPE properties on CursorObject.
>Infact even if i assign explicity UPDATETYPE=1 (should be default) the Cursor Adapter have the same behaviour as UPDATETYPE=2.
>
>I've discovered this because the TABLEUPDATE fails when SQL SERVER try to delete the record, infact my table (ABICAB) is a Parent table and if i try to update a record that is referenced the UPDATE FAILS.
>
>Where i can report this Bug ?
>SomeOne can help me to verify this beavhior (my english is very poor).
>
>Why when i try to catch on sql profiler the update commands sent to server by CursorAdapter, the profiler don't catch update command ?
>
>** Cut Here
>SQLSETPROP(0, 'displogin', 1)
>nHandle = SQLSTRINGCONNECT('DRIVER=SQL SERVER;SERVER=WXP04;APP=Microsoft Visual FoxPro;WSID=WXP04;DATABASE=MyDemo;Trusted_Connection=Yes')
>IF nhandle <=0
> RETURN
>ENDIF
>o = NEWOBJECT('CursorAdapter')
>o.DatasourceType = "ODBC"
>o.Datasource = nHandle
>o.SelectCmd = "SELECT * FROM AbiCab2 WHERE Cd_AbiCab LIKE '01%'"
>o.Alias = 'AbiCab2'
>o.buffermodeoverride = 5
>o.Tables = 'AbiCab2'
>o.KeyFieldList = 'Id_AbiCab'
>o.updatablefieldlist = 'Descrizione'
>o.updatenamelist = 'id_AbiCab AbiCab2.id_AbiCab, Descrizione AbiCab2.Descrizione'
>o.SendUpdates = .t.
>o.allowupdate = .t.
>o.allowdelete = .t.
>o.allowinsert = .t.
>o.updatetype = 1
>
>if o.CursorFill()
> SELECT (o.Alias)
> ** During Browser i modified some descriptions
> BROWSE NORMAL
> IF !TABLEUPDATE(1, .T., o.Alias)
> aerror(laErrors)
> messagebox(laErrors[2])
> ENDIF
> o.cursorRefresh()
> BROWSE NORMAL
>else
> aerror(laErrors)
> messagebox(laErrors[2])
>endif
>
>
>RELEASE o
>RETURN
>** Cut Here
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform