Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSDN content MDB 2 VFP
Message
De
26/04/2001 10:25:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
MSDN content MDB 2 VFP
Divers
Thread ID:
00500092
Message ID:
00500092
Vues:
98
For those who want MSDN 'UN-SUPPED\....MDB' converted to VFP I think it'd be good to share this little routine ( you know VFP better than Access :)
lcDataBaseName = 'MSDN'
lcMDBDir = 'C:\My Documents\MSDN CD SUBCRIPTION INDEXES\UN-SUPPED'
lcMDBName = 'MSDN APRIL CD SUBCRIPTION INDEX.MDB'
lnConnHandle = SQLSTRINGCONNECT('DSN=MS Access Database;DBQ='+;
  lcMDBDir+'\'+lcMDBName+';DefaultDir='+;
  lcMDBDir+';DriverId=25;FIL=MS Access;MaxBufferSize=2048;'+;
  'PageTimeout=5;UID=admin;')
Create data (lcDataBaseName)
SQLTABLES(lnConnHandle, ['TABLE'], 'myMDB')
Select myMDB
Scan
  lcSQL = 'select * from "'+trim(table_name)+'"'
  lcCursor = chrtran(trim(table_name),' ','_')
  lcTableName = '_'+lcCursor
  SQLEXEC(lnConnHandle,lcSQL,lcCursor)
  Select (lcCursor)
  Copy to (lcTableName)
  Add table (lcTableName)
Endscan
SQLDISCONNECT(lnConnHandle)
Modi data
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
Répondre
Fil
Voir

Click here to load this message in the networking platform