Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending data to SQL Server 7.0
Message
 
 
To
13/07/2002 14:50:39
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00678420
Message ID:
00678423
Views:
14
>Hello Group,
>
>If I want to send a date or a numeric data to a SQL stored procedure do I send it as a date or numeric or do I need to send it as a text type.
>

It depends on how you call SP. Assuming that you're using ODBC connection.
CREATE PROCEDURE proc_test 
	@p1 datetime, @p2 int = 0
AS
	SELECT @p1, @p2

...
ldDt = DATE()
lnInt = 5
* You can call it using parameters
? SqlExec(lnConn, [EXEC proc_test ?ldDt, ?lnInt])
* Or build a string
? SqlExec(lnConn, [EXEC proc_test '] + DTOC(ldDt,1) + [', ] + TRANSFORM(lnInt))
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform