Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
IS not there take a look of the code :
STORE L_IDENT TO L_II
STORE "F" TO THISFORM.LANGUE
thisform.oCA = CREATEOBJECT([CursorAdapter])
WITH thisform.oCa
.DataSourceType = [ODBC]
.DataSource = sqlstringconnect([dsn=sqlfoxpro;uid=sql;pwd=sql])
.WhereType = 1 && Key field only
.KeyFieldList = [ident]
.Tables = [dovendor]
TEXT TO .CursorSchema NOSHOW PRETEXT 15 TEXTMERGE
CNTR_ORIG C(3), COMPANY C(35), CONTACT C(30), CR_BY C(10), CR_DATE T, EDI C(12), EMAIL C(40), FAX C(15), IDENT I, LANGUE C(1), MAINADDR1 C(30), MAINADDR2 C(30), MAINCITY C(25), MAINCNTRY C(3), MAINSTATE C(3),MAINZIP C(10), NOTE M, PHONE C(15), PLACE_EXP C(3), TAXID C(15), TITRE C(20), VENDNO C(10), VFDCODE C(3),WEBPAGE C(100)
ENDTEXT
TEXT TO .SelectCmd NOSHOW PRETEXT 15 TEXTMERGE
select cntr_orig, company, contact, cr_by, cr_date, edi, email, fax,IDENT, langue, mainaddr1, mainaddr2, maincity,maincntry, mainstate, mainzip, note, phone, place_exp, taxid, titre, vendno, vfdcode, webpage from dovendor WHERE dovendor.ident = ?L_II
ENDTEXT
TEXT TO .UpdatableFieldList NOSHOW PRETEXT 15 TEXTMERGE
cntr_orig, company, contact, cr_by, cr_date, edi, email, fax, langue, mainaddr1, mainaddr2,maincity, maincntry, mainstate, mainzip, note, phone, place_exp, taxid, titre, vendno, vfdcode, webpage
ENDTEXT
TEXT TO .UpdateNameList NOSHOW PRETEXT 15 TEXTMERGE
cntr_orig dovendor.cntr_orig, company dovendor.company, contact dovendor.contact,cr_by dovendor.cr_by, cr_date dovendor.cr_date,edi dovendor.edi,email dovendor.email,fax dovendor.fax,langue dovendor.langue,mainaddr1 dovendor.mainaddr1,mainaddr2 dovendor.mainaddr2,maincity dovendor.maincity,Maincntry dovendor.maincntry,mainstate dovendor.mainstate,mainzip dovendor.mainzip,note dovendor.note,phone dovendor.phone,place_exp dovendor.place_exp,taxid dovendor.taxid,titre dovendor.titre,vendno dovendor.vendno,vfdcode dovendor.vfdcode,webpage dovendor.webpage
ENDTEXT
.UseCursorSchema = .t.
.Alias = [Cur_ad_vendor]
ENDWITH
IF NOT thisform.oCA.CursorFill()
AERROR(lAerror)
MessageBox([Can not fill the cursor adapter ]+lAerror[1,2])
RETURN
ENDIF
CURSORSETPROP('buffering', 5, 'Cur_ad_vendor')
thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement