General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Thanks for replying Mark. I retried it this morning and found that it was partially working for me. After a bit more testing I found that the data I had in my database which was populated from foxpro had the padded characters so this was what was causing me my grief. So I now have it working based on your builder as well as testing by building a cursoradapter in the data environment of a form using foxpros builder from scratch.
And of course best of all I am getting the varchars I am expecting on the oracle side.
Thanks
Jason
>Work with the one in your class from the Command window:
>
>o = newobject('ca_classname', 'classlibname')
>o.DataSource = nValidConnectHandle
>? o.CursorFill()
>
>if the Cursor fill returns false:
>
>aerror(laError)
>disp memo like laError
>
>then post the error results here. Otherwise, browse the returned cursor and make inserts, changes, deletes, whatever. Then:
>
>? TABLEUPDATE(1)
>
>If that returns false, run the aerror lines again and post the error info here.
>
>As for needing SQLCommit() or SQLRollback(), what is the value of:
>
>? SQLGETPROP(nValidConnectHandle, 'Transactions')
>
>If it is set to manual (e.g., =2), go ahead and issue a SQLCommit(). Otherwise, use SQLSetProp to set this to automatic if you do not need transactions.
>
>>In the dataenvironment of the form the cursoradapter:
>>tables = 'Generated_id' - yes
>>UpdatableFieldList = 'FieldID, LastUsed' - yes
>>UpdateNameList = 'FieldID Generated_ID.FieldID, LastUsed Generated_ID.LastUsed' - yes
>>KeyFieldList = 'FieldID' - yes
>>SendUpdates = .T. - yes
>>AllowInsert = .T. - yes
>>AllowUpdate = .T. - yes
>>AllowDelete = .T. - yes
>>DataSourceType = 'ODBC' - yes
>>
>>In the cursoradapter from the class:
>>tables = 'Generated_id' - yes
>>UpdatableFieldList = 'FieldID, LastUsed' - yes
>>UpdateNameList = 'FieldID Generated_ID.FieldID, LastUsed Generated_ID.LastUsed' - yes
>>KeyFieldList = 'FieldID' - yes
>>SendUpdates = .T. - yes
>>AllowInsert = .T. - yes
>>AllowUpdate = .T. - yes
>>AllowDelete = .T. - yes
>>DataSourceType = 'ODBC' - yes
>>
>>Unfortunately I still don't know what I am doing wrong.
>>
>>Do I need to do an sqlcommit for cursoradapters like I do for remote views?
Previous
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