Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Syntax
Message
From
31/12/2008 13:07:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SPT Syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01370358
Message ID:
01370358
Views:
72
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
Next
Reply
Map
View

Click here to load this message in the networking platform