Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass Through issue
Message
From
28/08/2008 16:38:57
 
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:
01342812
Views:
12
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 :)

>Jon,
>
>For readability and easier maintenance use TextMerge. You can copy your query from QA verbatim and adjust a parameter
>Also I would use DATEPART() instead of 'fn{}'.
snip....
Thanks
Jon
Non-MVP Non-MCP Non-MCSE

Visual FoxPro, What else is there?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform