Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a better way - VFP to Oracle
Message
De
28/03/2006 06:43:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Oracle
Divers
Thread ID:
01107372
Message ID:
01108284
Vues:
21
>Hi Cetin,
>
>Thanks for your reply. I am uncertain how to implement your suggestion. Could you post a sample?
>
>Thanks
>Vince

Sample is for SQL server, but main idea is same.
csql = "SELECT EmployeeID, LastName, FirstName," + ;
		"BirthDate," + ;
		"Hiredate FROM dbo.Employees"

lnHandle=Sqlstringconnect('DRIVER=SQL Server;'+;
  'SERVER=(local);DATABASE=Northwind;Trusted_Connection=Yes')
SQLExec(lnHandle,cSQL,'v_emp')

CursorSetProp('KeyFieldList','Employeeid','v_emp')
CursorSetProp('WhereType',1,'v_emp')
CursorSetProp('Tables','employees','v_emp')

CursorSetProp("UpdateNameList", ;
  "employeeID    employees.employeeid,"+;
  "Firstname employees.FirstName,"+;
  "Lastname employees.Lastname,"+;
  "BirthDate employees.birthdate",'V_emp')

CursorSetProp('UpdatableFieldList',"Firstname,Lastname,BirthDate",'v_emp')
CursorSetProp('SendUpdates',.T.,'v_emp')
CursorSetProp('Buffering',5,'v_emp')
Browse title 'Editable fields are : Firstname,Lastname,BirthDate'
If !Tableupdate(2,.T.,'v_emp')
  AError(arrWhy)
  Display memo like arrWhy
endif
SQLExec(lnHandle,'select * from dbo.employees','afterupdate')
SQLDisconnect(lnHandle)
Select afterupdate
Browse
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform