Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a date to a SQL stored proc using SQLEXEC
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Passing a date to a SQL stored proc using SQLEXEC
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01090805
Message ID:
01090805
Views:
110
I am running SQL Server 2000 and am using SQLEXEC() to pull recordsets from SQL. I want to pass two date parameters from VFP7 to SQL using SQLEXEC but I don't get any data back. Here is my syntax on the VFP side:

nRetVal = SQLEXEC(nConn,"EXEC usp_StoredProc '"+ALLT(DTOC(dDate1))+"' '"+ALLT(DTOC(dDate2))+"'",'cursor1')

Within my SQL sp I have a @dDate1 DATETIME, @date2 DATETIME declared.

Do I need to somehow CAST the VFP dates to DATETIME?
Next
Reply
Map
View

Click here to load this message in the networking platform