Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass Through issue
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01342682
Message ID:
01343000
Views:
11
Hi Jon,

The query looks much better, doesn't it? :)
BTW, you don't need SQLPREPARE() unless you're planning to execute the query in a loop with different parameters.


>Gee Wiz I'm having a tough time with this, but I think I'm starting to make progress. Thanks to you and other's for the heads up on the "Text...EndText" I'll be spending some time playing with that. Here is my current code:
>m.nConnectionHandle = SQLCONNECT('TimeClockPlus')
>cCostCode = '11708'
>
>TEXT TO lcCmd NOSHOW PRETEXT 15
>
>select cast(dbo.EmployeeHours.EmployeeId as TinyInt) as EmployeeID,
>	EmployeeHours.TimeOut,
>	ROUND(DATEPART(hour,TimeOut)+CEILING(CAST(DATEPART(Minute,TimeOut) as decimal)/60 * 100)/100,2) As Decout,
>	CEILING(CAST(DATEPART(Minute,TimeOut) as decimal)/60 * 100)/100 as TestField
>from EmployeeHours
>where CostCode = ?cCostCode
>
>ENDTEXT
>
>? SQLPREPARE(m.nConnectionHandle,lcCmd,'QueryName')
>?? SQLEXEC(m.nConnectionHandle)
>
>BROWSE LAST NOWAIT
>
>*SQLDISCONNECT(m.nConnectionHandle)
>
>
>
>I'll continue down this frustrating road (for me anyway). Keep you eyes peeled for further white flags flailing violently :)
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform