Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting data from MDB to SQL 2000
Message
De
26/09/2005 05:52:02
 
 
À
26/09/2005 04:53:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01052928
Message ID:
01052951
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>Hi Jon,
>
>I've tried the OPENROWSET of SQL and it worked!... I tried it in query analyzer but could'nt make it work in vfp.
>
>I've tried using sqlexec but won't work. Please help...
>
>Thanks in advance...

Mike,
Copy your query from Query analyzer,
In VFP do:
m.lhSQL = SQLSTRINGCONNECT(".....") && Connection string to SQL Server
IF m.lhSQL < 0
   AERROR(laError)
   MessageBox("Can not connect to SQL Server. Reason: "+laError[1,2])
   RETURN
ENDIF

TEXT TO m.lcSQLStatement NOSHOW
    *** Here paste the copied query from Query analyzer
ENDTEXT

IF SQLEXEC(m.lhSQL, m.lcSQLStatement) < 0
   AERROR(laError)
   MessageBox("Can not execute SQL Statement. Reason: "+laError[1,2])
ENDIF
SQLDISCONNECT(m.lhSQL)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform