Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle varchar in remote view
Message
 
 
À
24/09/2004 16:56:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00945603
Message ID:
00945924
Vues:
19
The values of the following properties of the CA should be something like:
Tables = 'Generated_ID'
UpdatableFieldList = 'FieldID, LastUsed'
UpdateNameList = 'FieldID Generated_ID.FieldID, LastUsed Generated_ID.LastUsed'
KeyFieldList = 'FieldID'
SendUpdates = .T.
AllowInsert = .T.
AllowUpdate = .T.
AllowDelete = .T.
DataSourceType = 'ODBC'
>I am testing a very basic oracle table with cursoradapters. The table is as follows:
>
>Table: Generated_id
>fields: FIELDID varchar(8)
> LASTUSED varchar(20)
>primary key: FIELDID
>
>I created a class called test. Into test I added a class called caGenerated_id which is based on a cursoradapter.
>
>I went through the cursor adapter builder and set the following:
>Properties tab:
> ODBC data source
> use dsn - filled in with appropriate information and tested
>Data Access tab:
> Select command: select GENERATED_ID.* from GENERATED_ID
> schema: FIELDID C(8), LASTUSED C(20)
> buffer mode: optimistic table buffering
>Auto update tab:
> send updates - checked
> auto update - checked
> both fields checked for update
> primary key field checked
>
>I went through the data environment builder on the form. I did not fill in the data source type in the first tab. The the cursors tab I located my class and added the cursor adapter from the class. I left everything as displayed except what was in the autoupdate tab. For some reason the update fields were not longer checked nor was the primary key field checked. So I rechecked them as before. Any idea why this was like what I saw?
>
>I then added a command button on the form to test the operation of the cursoradapter. The following is the code from the buttons click event:
>
>SELECT genkey
>BROWSE NORMAL
>SELECT genkey
>INSERT INTO genkey (fieldid, lastused) VALUES ('test','0123')
>SELECT genkey
>BROWSE NORMAL
>SELECT genkey
>llupdate = TABLEUPDATE(.T.,.T.,'genkey')
>IF llupdate
> =MESSAGEBOX('success')
>ELSE
> AERROR(cErrorArray)
> =MESSAGEBOX("Error: " + STR(cErrorArray(1)) + CHR(13) + cErrorArray(2))
>ENDIF
>
>Basically I wanted to show the original contents, then add a record and finally update the table.
>
>BUT, the form tells me success and oracle shows no new record. What am I doing wrong?
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform