Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get MySQL Table Structure in VFP
Message
De
10/06/2005 09:10:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/06/2005 04:56:57
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
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
Database:
MySQL
Divers
Thread ID:
01021733
Message ID:
01022111
Vues:
12
>Is there a way that I can get the columns and structure from MySQL in VFP?
>Can It be done in using ADO?

Check Message #1021710 for ODBC.
You can also get it with ADO if you've OLEDB driver. ie:
#Define adSchemaCatalogs 1
#Define adSchemaColumns 4
#Define adSchemaTables 20

Local oConn As 'ADODB.Connection'
oConn = Createobject('ADODB.Connection')
oConn.Open( "Provider=sqloledb;Data Source=cetin;"+;
  "Initial Catalog=Pubs;Integrated Security=SSPI" )
rstSchema = oConn.OpenSchema(adSchemaColumns)
ShowMe(rstSchema)
rstSchema.Close
oConn.Close

Function ShowMe
  Lparameters toRecordset
  oForm = Createobject('myForm', toRecordset)
  oForm.Show
  Read Events
Endfunc

Define Class myform As Form
  Height = 450
  Width = 750
  Name = "Form1"

  Add Object hflex As OleControl With ;
    Top = 10, Left = 10, Height = 430, Width = 730, Name = "Hflex", ;
    OleClass = 'MSHierarchicalFlexGridLib.MSHFlexGrid'

  Procedure Init
    Lparameters toRecordset
    This.Caption = "Recordset"
    This.hflex.Datasource = toRecordset
    This.hflex.AllowUSerResizing = 3
  Endproc
  Procedure QueryUnload
    Clear Events
  Endproc
Enddefine
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
Répondre
Fil
Voir

Click here to load this message in the networking platform