Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql server - vfp how?
Message
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 9
Divers
Thread ID:
01541027
Message ID:
01541046
Vues:
119
This message has been marked as the solution to the initial question of the thread.
Once you get passed the hump, it all gets pretty easy in VFP to access SQL*Server Data. Here is a quick example In its simplest form using a connectionstring (not the cursor adapter thing): (Note: I didn't test it, so there are probably errors in the text below!)

******************************************************************
strConnectionString = [Driver={SQL Server};Server=ServerNameHere;Database=YourDatabase;Uid=user_id;pwd=password]
strSQL = "select * from Names where intPK = '1' " && or what ever sql statement you are passing.
csrCursorToBeReturned ="csrNames"
intHandle = SQLSTRINGCONNECT(strConnectionString)
intResults = SQLEXEC(intHandle, strSQL, csrCursorToBeReturned)

***************************************************************************************************
You now have vfp cursor (csrNames) do play around with in pure VFP. ... and you can do updates and inserts and deletes the same basic way.

Kevin
Kevin Emmrich
www.jkt9000.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform