General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Sergey,
The code generated by genview - on vfp6 is pasted below.
I ran this code against a vfp8 dbc that didn't have this view. It executed and returned no errors.
When I went into the view designer and clicked view sql the field level properties were set as follows:
DBSetProp(thisview + ".exp", 'Field', 'KeyField', .T.)
DBSetProp(thisview+ ".exp", 'Field', 'Updatable', .T.)
DBSetProp(thisview+".exp", 'Field', 'UpdateName', 'dbo.rssyst.cRsbatchno')
DBSetProp(thisview.+".exp", 'Field', 'DataType', "C(10)")
then for the next field 'exp1', this view only had two fields. For others, where there were many more fields it repeated with exp2, exp3, etc for each field. If I went to save the view it said - object exp not found in the database.
I had about 20 views that I did this with. I went back into the view designer and replaced the dbsetprop statements that had 'exp' with the original statements from genview and thereafter it worked fine. (also I dropped the dbo. prefixes - as this seems to cause a problem)
Thanks.
***************** Begin View Definition v_rssyst ***************
CREATE SQL VIEW "v_rssyst" ;
REMOTE CONNECT "vamconnect" ;
AS SELECT DBO.RSSYST.CRSBATCHNO, DBO.RSSYST.CPIKTIKGENNO FROM DBO.RSSYST
DBSetProp('v_rssyst', 'View', 'UpdateType', 1)
DBSetProp('v_rssyst', 'View', 'WhereType', 3)
DBSetProp('v_rssyst', 'View', 'FetchMemo', .T.)
DBSetProp('v_rssyst', 'View', 'SendUpdates', .T.)
DBSetProp('v_rssyst', 'View', 'UseMemoSize', 255)
DBSetProp('v_rssyst', 'View', 'FetchSize', 100)
DBSetProp('v_rssyst', 'View', 'MaxRecords', -1)
DBSetProp('v_rssyst', 'View', 'Tables', 'DBO.RSSYST')
DBSetProp('v_rssyst', 'View', 'Prepared', .F.)
DBSetProp('v_rssyst', 'View', 'CompareMemo', .T.)
DBSetProp('v_rssyst', 'View', 'FetchAsNeeded', .F.)
DBSetProp('v_rssyst', 'View', 'FetchSize', 100)
DBSetProp('v_rssyst', 'View', 'Comment', "" + CHR(13) + "OWNER=ERP")
DBSetProp('v_rssyst', 'View', 'BatchUpdateCount', 1)
DBSetProp('v_rssyst', 'View', 'ShareConnection', .T.)
*!* Field Level Properties for v_rssyst
* Props for the v_rssyst.crsbatchno field.
DBSetProp('v_rssyst.crsbatchno', 'Field', 'KeyField', .T.)
DBSetProp('v_rssyst.crsbatchno', 'Field', 'Updatable', .T.)
DBSetProp('v_rssyst.crsbatchno', 'Field', 'UpdateName', 'dbo.rssyst.cRsbatchno')
DBSetProp('v_rssyst.crsbatchno', 'Field', 'DataType', "C(10)")
* Props for the v_rssyst.cpiktikgenno field.
DBSetProp('v_rssyst.cpiktikgenno', 'Field', 'KeyField', .F.)
DBSetProp('v_rssyst.cpiktikgenno', 'Field', 'Updatable', .T.)
DBSetProp('v_rssyst.cpiktikgenno', 'Field', 'UpdateName', 'DBO.RSSYST.CPIKTIKGENNO')
DBSetProp('v_rssyst.cpiktikgenno', 'Field', 'DataType', "C(10)")
>Hi David,
>
>Can you post the code to create the view and explain what you expected and what you got when you excuted it.
>
>>The remote views I created programmatically in vfp 8.0 all have 'exp1', exp2' etc. for the dbsetprop statements - instead of the field names e.g. 'thisview.exp1'
>>
>>I saw this listed as a possible bug in another thread - but in that thread the poster's were referring to Oracle and/or Rumba - I think. In my case it is to sqlserver 2000. There were also some references to the field length's not being created correctly - I haven't checked that yet.
>>
>>Here are the steps I took:
>>
>>1) used erik moore's genview.prg to create the view definition statements (on a vfp 6.0 dbc)
>>
>>2) ran the code created by genview in vfp 8 to add the views from the vfp6 app to the vfp 8 app's dbc.
>>
>>3) The genview statements look correct to me.
>>
>>Is this a known bug? Is there a workaround?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only