Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT Syntax
Message
De
31/12/2008 13:07:39
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SPT Syntax
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01370358
Message ID:
01370358
Vues:
73
Hi All:

I have a client who has SQL Server enterprise 2003 version. He wants to go against the SQL Server database from within VFP.

Since I know very little about SQL Server, I have asked a SQL Server expert to go onsite and help me. He, on the other hand, has no experience with VFP.

I have prepared a program for him to try, based on SQL Server code supplied to me by my client, as follows. I am expecting my consultant to fill in the blanks such as userid and password:
LOCAL lcSQLString 

lcSQLString = "UPDATE rlitepro10.dbo.icitem  " ;
	+ "set icitem.price2 = icpric.unitpr2,icitem.level2 = icpric.begqty2,icitem.price3 = 2* (icpric.unitpr2)-0.01  " ;
	+ "FROM rlitepro10.dbo.icitem icitem, rlitepro10.dbo.icpric icpric  " ;
	+ "WHERE icitem.item = icpric.item AND ((icpric.psched='SAL') AND (icpric.popt='I'))"


lnConnectionHandle = SQLCONNECT('rlitepro10.dbo','<userid>','<password>')

IF !(lnConnectionHandle = -1)
	SQLEXEC(lnConnectionHandle , lcSQLString)
	
	SQLDISCONNECT(lnConnectionHandle )
	
ENDIF
Do I need to know anything else or add anything else to the program?

Any help on this will be much appreciated.

Thanks,

Yossi
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform